I have a list and the li's have a float:left;
. The contents after the <ul>
should be aligned correctly. Therefore i can build the following:
http://jsfiddle.net/8unU8/
I thought, that I can remove the <div class="clear">
by using pseudo selectors like :after.
But the example is not working:
http://jsfiddle.net/EyNnk/
Do I always have to create a separate div to clear floating elements?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…