clear: both;
<div>
<p>foobar</p>
<div style="float: left;">qwerty</div>
<br style="clear: both;>
</div>
<div style="overflow: auto;">
<p>foobar</p>
<div style="float: left;">qwerty</div>
</div>
<style type="text/css">
<!--
#container {
border: 1px solid #000000;
}
-->
#float {
float:left;
height: 50px;
width: 100px;
}
</style>
</head>
<body>
<div id="container">This is a container
<div>This not floated and remains inside the container </div>
<div id="float">This is inside the container but floated left </div>
<div id="float">This is inside the container but floated left </div>
<div id="float">This is inside the container but floated left </div>
<div id="float">This is inside the container but floated left </div>
</div>
</body>
</html>
<div class="container">This is a container
<div>This not floated and remains inside the container </div>
<div class="float">This is inside the container but floated left </div>
<div class="float">This is inside the container but floated left </div>
<div class="float">This is inside the container but floated left </div>
<div class="float">This is inside the container but floated left </div>
<div id="clear_both" style="clear:both;"></div>
</div>
PiKe said:New problem, how do I get div's side by side but centered in another container div of variable width?
The only way I know of getting them side by side is to float them, but floating overrides the div align.
<div id="container">
<div id="innerContainer">
<div id="div1"></div>
<div id="div2"></div>
</div><!-- end of innerContainer -->
</div><!-- end of container -->