Wiz
Wiz

Reputation: 4865

Weird <hr> tag behavior

When I try to put an hr tag after a div whose text has been wrapped, the div appears like this. If you look carefully, the line is on the side, in the middle of the paragraph. It works fine if the text isn't wrapped, but how do I fix this for multiple line posts.

Upvotes: 0

Views: 374

Answers (1)

Dennis Traub
Dennis Traub

Reputation: 51634

Add hr { clear: both; } to your style definitions. Otherwise it will be rendered next to the enclosing paragraph that is floating left.

I updated your jsFiddle example accordingly.

Upvotes: 5

Related Questions