robmercer wrote:
> I can't understand why there is green below the sidebar div. It should be
> blue since "sidebar" is within container!
But:
1. div#container isn't styled blue. (Check with Firebug.)
2. div#container contains two floated children (div#content and
div#sidebar). When you float an element, you move it out of normal flow.
When overflow is visible on a container, its height is determined
by the content in normal flow. Since there's no content in normal flow,
it's height is 0. To make the container expand to contain the floats,
you need to use one of the normal methods for containing floats:
http://www.ejeliot.com/blog/59
For example:
div#container {
background-color: blue;
overflow: hidden;
}
If you're trying to make equal height columns, the classic faux columns
article might help you:
http://www.alistapart.com/articles/fauxcolumns/
--
Benjamin Hawkes-Lewis
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/