Forum Moderators: not2easy
// Option 1
<div style="overflow: hidden">
<div style="float: left">Whatever</div>
<div style="float: left">Whatever Else</div>
</div>
// Option 2
<div style="float: left">Whatever</div>
<div style="float: right">Whatever Else</div>
<div style="clear: both"></div>
// Option 3
.clear:after {
clear: both;
content: '';
display: table
}
<div class="clear">
<div style="float: left">Whatever</div>
<div style="float: left">Whatever Else</div>
</div> <style>
.clr { overflow: hidden }
<script>
// using jQuery, but I don't think that's an issue for this example
$(function() {
$('#bar').ajax('whatever.php');
});
</script>
<div id="foo" class="clr">
<div id="bar" style="float: left"></div>
<div id="bar_2" style="float: right"></div>
</div>