אחרי שאתה מסיים לעבוד עם FLOAT אתה צריך להוסיף שכבה עם מאפיין CLEAR,
לדוגמא:
HTML קוד:
<html dir="rtl">
<head>
<style type="text/css">
#mainDiv{
width:950px;
background-color:blue;
margin:auto;
}
</style>
</head>
<body>
<div id="mainDiv">
<div style="float:right;">
1
</div>
<div style="float:left;">
2
</div>
<div style="clear: both"></div>
</div>
</body>
</html>