Is there a better alternative to Line Break

Sometimes after a class, the <div>next line is displayed on the same line, and I need to add 10 <br>to go to the next line.

Is this good or is there an alternative to this?

Everything works fine, I just need to put 10 <br>. This is normal?

thank

GET WORK USING CLEAR: BOTH. THANKS.

+3
source share
3 answers

You need to clear your floating elements. Put this after the elements:

<div style="clear:both"></div>
<!-- Now you won't need <br/> to display text here -->
+9
source

No, this is not normal.

+2
source

, , , ...

<div style="float:left"> some text here... </div>

<div> some other text ... </div>

, DIV DIV, :

<div style="float:left"> some text here... </div>

<div style="clear:left"> some other text ... </div>
+2

Source: https://habr.com/ru/post/1769812/


All Articles