My DIV is not expanding correctly, should be easy fix

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.

http://vismarkgroup.com/dev/H4H/faq.php

Thanks!!!

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;

#cbg{overflow:hidden;}

However #info needs to be cleared from the header


#info{clear:both;}

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

Just google containing floats :slight_smile:.

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.