I have an issue with twitter bootstrap that looks a little bit strange to me. I have a sidebar with fixed with at the left side and a main area.
<div>
<div id="sidebar">
<ul>
<li>A</li>
<li>A</li>
<li>C</li>
<li>D</li>
<li>E</li>
<li>F</li>
<li>...</li>
<li>Z</li>
</ul>
</div>
<div id="main">
<div class="clearfix">
<div class="pull-right">
<a>RIGHT</a>
</div>
</div>
<div>MOVED BELOW Z</div>
</div>
#sidebar {
background: red;
float: left;
width: 100px;
}
#main {
background: green;
margin-left: 150px;
overflow: hidden;
}
Inside the main area I have some content with pull-left and pull-right with is cleared by a clearfix.
The problem is that the content below the clearfix-div is moved to be lower than the sidebar-content.
I made a fiddle for this: http://jsfiddle.net/ZguC7/
I solved the problem by setting the "overflow: collapse" to #main, but I dont understand it and would be very happy if somebody can explain what is causing this issue.