aaaaaaaaaa
bbbbbbbbbb
ccccccccccc

How clear are both?

<div class="one">aaaaaaaaaa </div>
<div class="one">bbbbbbbbbb </div>
<div class="one">ccccccccccc </div>
<span style="clear: both">
    THIS SHOULD BE BELOW TABLE. WHY NOT?

.one {
  background-color: red;
  float: left;
}

http://jsfiddle.net/bLsju/2/

Why is there still a float in this example? How can I use clear: both?

+3
source share
9 answers

can you check this DEMO , it can help you. use a div instead of a span.

+3
source

The property is clearignored if the element is not a block element. Use style="display: block"on span or use div, which is a block element.

+7
source

span div. .

+5

. display: block;, .

+4
+3
 <div style="clear: both">&nbsp;</div>

span,

+1

, span . . "display: block"

div span

. 2 :

jsfiddle.net/bLsju/7/

jsfiddle.net/wmT9w/

.

0

div. :

<span style="display:block;clear: both"></span>
0

clear: , .

duplicate of: = "clear: both" ?

-1
source

All Articles