noslenwerd — 2010-01-28T09:40:59-05:00 — #1
The div in question is "cbg" ... I have a 900px by 1px jpeg i want to use as the background. Its 2/3 white (like the left column) and 1/3 black (like right column)
Any idea why it isn't expanding? You can see what I am trying to do if you enter in 1000px for the height attribute in the css.
ryanreese — 2010-01-28T11:50:49-05:00 — #2
Hi, the problem is that #cbg's childs are floats and as such they are collapsing that elements height. You need a clearing mechanism placed on it. Aka overflow:hidden;
However #info needs to be cleared from the header
noslenwerd — 2010-01-28T12:02:08-05:00 — #3
Perfect.. thanks so much Ryan
Do you have any articles to suggest for me to read on css clears? Thats one concept I have never really grasped
ryanreese — 2010-01-28T12:13:34-05:00 — #4
Just google containing floats :).
Basically it's very easy to understand.
If you have floats, the direct parent needs a clearing mechanism, overflow:(auto or hidden), the clearfix, a clearing element, etc.
It's very simple to understand.