Given the following style:
#myDiv{
background:orange;
width:250px;
}
and the following HTML code:
<div id="myDiv">
<p>
Vote Pirates!<br />
</p>
</div>
Why exactly would it change the size of the div when I add a float:left property to the myDiv style?
Edit: Turns out this is a browser-issue, or even worse an operating system specific problem.
This seems like the likely answer: A floated box is taken out of the flow, so it doesn’t affect the block-level boxes around it.
Lifted from this page on sitepoint.
Also, you might be experiencing browser specific functionality (errors?). Are you using IE 6.0?