According to the CSS 2.1 standard, the vertical margins of floating elements should not collapse with any adjacent elements.
See: http://www.w3.org/TR/CSS21/box.html#collapsing-margins
But actually this is not what happens in all browsers (FF, Safari, Opera and Chrome) except IE6 (didn't try with IE7 or IE8 though). Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
</head>
<body>
<div style="margin-bottom:10px;">HEADER</div>
<div style="float:left;width:100%;margin:10px 0px;">Floating div</div>
<div style="margin-top:10px;">FOOTER</div>
</body>
</html>
Adding clear:both; to the footer div didn't make any difference.
I'm no expert in CSS so please correct me if my understanding is wrong
Edit:
Obviously my question caused some confusion. The code above is just for demonstrating the behavior I'm referring to, it's not a real problem that I'm trying to find a solution to.