Forum Moderators: not2easy
border: 1px solid magenta; .clear
{
clear:both;
}
[edited by: alt131 at 1:34 pm (utc) on Sep 11, 2011]
[edit reason] Thread Tidy [/edit]
Now the issue I am having is that the magenta div is not enclosing the navigation at all but it is above it, and I am going crazy trying to understand why.If Marshall has identified the desired layout, I would also suggest asking why the magento div is being drawn "above" the navigation div in the first place. For example, has it been positioned, or does it have an explicitly set height that is less than the height of the navigation div?
so about the containers, you are saying that if an element has an explicit height or a floating applied to it I shouldn't put it into a div?Almost :)
I have kind of noticed on the net, from my own research, that some developers really like the idea of an empty div, whereas others loathe it : - )- which can be confusing when starting. I just look to the recommendations, such as 2.4.1 Separate structure and presentation [w3.org], and 2.4 CSS design principles (Complementary to structured documents) [w3.org]. Otherwise: just because you can (insert an empty div) doesn't mean you should ;)