CSS Span Float Left
So I have a div and two spans:
<div class="A">
<span class="B"></span>
<span class="C"></span>
<span class="clear"></span>
</div>
Suppose that B and C have sufficient content. CSS snippet:
.A { position: absolute; } /* I need this to be absolute */
.B, .C { float: left; }
.clear { clear: both; }
But I keep getting the layout of the correct image, while I want it to look like the layout of the first image (see image below)

Please help me. And it would be better if you kindly explain why they occur, and why my code does not work, as I expected. How float works. Thank.
+3
2 answers
Are your classes in html capitals, but not CSS?
EDIT:
.A { position: absolute; border: 1px solid blue; }
.B, .C { float: left; border: 1px solid red; width: 100px; height: 20px; }
.C { height: 100px; }
.clear { clear: both; }<div class="A">
<span class="B"></span>
<span class="C"></span>
<span class="clear"></span>
</div>+8