jack
jack

Reputation: 41

Is there a better alternative to Line Break

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.

Upvotes: 3

Views: 5380

Answers (3)

Šime Vidas
Šime Vidas

Reputation: 185873

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>

Upvotes: 2

Splashdust
Splashdust

Reputation: 787

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 -->

Upvotes: 9

Yarek T
Yarek T

Reputation: 9925

No this is not normal

Upvotes: 2

Related Questions