Sometimes after a <div>
class the next line comes on the same line and I need to put say 10 <br>
to get it to the next line.
Is this okay or is there an alternative to this?
开发者_如何学运维Everything works out fine, it's just that I need to put 10 <br>
. Is this normal?
Thank You
GOT IT TO WORK USING CLEAR:BOTH. THANKS.
You need to clear after your floating elements. Put this after the elements:
<div style="clear:both"></div>
<!-- Now you won't need <br/> to display text here -->
No this is not normal
Ok, I think I understand what you mean...
<div style="float:left"> some text here... </div>
<div> some other text ... </div>
If you want the second DIV to be pushed below the first DIV, you have to set its clear property to left:
<div style="float:left"> some text here... </div>
<div style="clear:left"> some other text ... </div>
精彩评论