Clearing the <hr /> Tag with CSS That Works in IE
by Bandicoot Marketing on | Posted in Tutorials | 2 comments
There is nothing more annoying than Internet Explorer. Every time you build a site you usually need to add a few CSS hacks just to make sure it works in IE.
Here is some nice CSS to help anyone who wants to use <hr /> tags to clear sections of their site.
hr.clear {
background: none;
border: 0;
clear: both;
display: block;
float: none;
font-size: 0;
margin: 0;
padding: 0;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
Just use the following code whenever you want to clear with an <hr /> tag.
<hr class="clear" />

2 comments for “Clearing the <hr /> Tag with CSS That Works in IE”