user3815203
user3815203

Reputation: 39

line breaks not working after <br/> tag

Below is my code:

<div style="float: left; margin-left: 50px; margin-bottom: 50px"><img src="06fc499c-5329-419c-b0df-644ee5d8439b_icon48.png"></div>

<br/>

<div>&nbsp;<strong>1</strong>&nbsp;<a href="1">2</a>&nbsp;<a href="2">&gt;</a>&nbsp;</div>

I found that style="float: left; margin-left: 50px; margin-bottom: 50px" that causes all on the same line, when i remove the style="float: left; margin-left: 50px; margin-bottom: 50px", The line break after <br/> tag operates normally. However, I wanted to keep ` style="float: left; margin-left: 50px; margin-bottom: 50px" from the beginning. How do I use the line break in this case?

Thanks so much for advice.`

Upvotes: 0

Views: 6069

Answers (1)

user3815203
user3815203

Reputation: 39

Fixed by adding style="clear: both" which makes the element drop below any floated elements that precede it in the document.

Upvotes: 1

Related Questions