Not sure what's going on. For a client redesign, my wrapper divs seem to NOT encompass the divs & other stuff inside. I want to apply a background color to these wrapper divs, but so far I'm stymied.
Markup and CSS both validated at W3C.
My outermost div (#wrap-all) and an inner div (#content-wrap) both seem to occupy only the small area of my heading, instead of expanding to surround their contents. ( I use bright background colors and borders to help me see where things are in the layout.)
I must be missing something very basic, and I suspect I'll feel real stupid when I learn what it is. Also, I apologize for the length of the markup and CSS - most of it doesn't apply to the problem but I figured I'd better show everything than guess what's necessary.
I have a feeling that it should cause ill effects, but I can't quite give you a specific scenario right now of that happening.
The 'classic' solution to solve the clearing of the floats would be to add this right before you close #content_wrap: <div class="clear"></div> Then in your CSS file add: .clear { clear: both; }
Thanks, your explanation of how/where to use clear did the job.
I've removed my odd padding entry. I trust your instincts on that: even though it seemed to work with no ills effects, it sure had the look and feel of an ill-advised hack.
Markup and CSS both validated at W3C.
My outermost div (#wrap-all) and an inner div (#content-wrap) both seem to occupy only the small area of my heading, instead of expanding to surround their contents. ( I use bright background colors and borders to help me see where things are in the layout.)
I must be missing something very basic, and I suspect I'll feel real stupid when I learn what it is. Also, I apologize for the length of the markup and CSS - most of it doesn't apply to the problem but I figured I'd better show everything than guess what's necessary.
Here's the markup:
Here's the CSS (omitting initial comments and my reset);
Thanks...
http://css-tricks.com/all-about-floats/
I couldn't get anything accomplished with clear.
But I did notice that if I add this:
to my
it looks like it displays things the way I want.
Do you have a link to the site?
very rough draft page
The garish colors are just to help me see the layout during development; hopefully the color palette I select for the real thing will be better.
on the Haven't seen any ill effects of it so far in my testing, but if this is a bad idea, I'll remove it once I have a better solution.
The 'classic' solution to solve the clearing of the floats would be to add this right before you close #content_wrap:
<div class="clear"></div>Then in your CSS file add:
.clear { clear: both; }Thanks, your explanation of how/where to use clear did the job.
I've removed my odd padding entry. I trust your instincts on that: even though it seemed to work with no ills effects, it sure had the look and feel of an ill-advised hack.