Posted on : 19-11-2008 | By : Stefan | In : CSS
Ok… so you setup a page with a blue background and float an object left, for example. You now see that the background colour on the float is white! Ruining the look of your page.
<div id=”contentBody”>
<div style=”float: left;”>Floated Content</div>
</div>
So how do we do it? Use the following hack:
#contentBody:after { content: “.”; display: block; height: 0; clear: both; visibility: hidden; } * html #contentBody { height: 1%;}
0