My understanding of `clear: left`, `clear: right`, and `clear: both` in CSS has always been a bit fuzzy. I know that `clear: both` means it prevents floating elements from appearing on both sides, but I recently did some testing here. I expected the layout to look like this:
A
B
CD
Updated (Post the code)
<div class="container">
<div class="A">a</div>
<div class="B">b</div>
<div class="C">c</div>
<div class="D">d</div>
<div class="CB"></div>
</div>
.container{
width:100%;
border:1px solid red;
}
.B{
float:left;
clear:both;
width:10%;
height:30px;
border:1px solid blue;
}
.A,.C,.D{
float:left;
width:10%;
height:30px;
border:1px solid blue;
}
.CB{
clear:both;
}