I continue to discover that if I have nested divs inside each other, and one of the inner ones is floating, the outer one will not expand around it.
Example:
<div style='background-color:red; '>
asdfasdf
<div style='float:left; background-color:blue; width:400px; height:400px;'>
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
asdfasdfasdfasdfasdfasdfasdf<br />
</div>
asdfasdf
</div>
What do I need to do for the outer div to cover the inner div? IE: Does this place a border / background color around it?
Also, is there a general principle that I come across here? If so, what should I look for to get a clear idea of what it is?
Thanks!
Edit
Hello everybody,
Thanks for the answers, semantically correct and not, and for the links.
, Ant P , , , , .
html-, css, , , , , , , = o )