Clearing the <hr /> Tag with CSS That Works in IE

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.


Share this:

Email
Facebook
Twitter
Pinterest
Pocket

Premium Themes for WordPress

Looking for an easy-to-use Premium Theme for WordPress? Check out Themes by bavotasan.com and have your site up and running in no time.

Use this WordPress website builder to build powerful websites in no time for your or your clients.

WordPress Hosting

WP Engine – designed from the ground-up to support and enhance the workflow of web designers.

Bluehost – providing quality web hosting solutions since 1996.

About the author

Picture of Luke Perrie

Luke Perrie