Cross-Browser Styling For hr Tag

The innocuous hr tag renders quite differently across IE, Chrome and Firefox. In particular, on the last two mentioned browsers the hr was rendering with an indented border, which it didn’t in IE.

Searching for a cross-browser way to style hr I ended up at this very helpful forum post from HTML Help Central, entitled ‘Google Chrome With hr, but then had to tweak it a bit so that it worked across my browser family.

Here’s the final result for which I was awarded the VC, DSM, OBE and P-K4:

hr
{
border-top:1px #dbdee4 solid;
height: 1px;
border-bottom:0;
border-left:0;
border-right:0
}

Of course you can substitute #dbdee4 for any colour you desire. Maybe try ‘Off Puce’. Puce, specifically, is the color of the belly of a flea.

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: