Brett Kelly’s Web Journal

Brett Kelly’s Web Journal

Brett Kelly  //  This is primarily content that originates from my iPhone. Mostly pictures and short posts about me and crap.

Elsewhere: http://brettkelly.org

Nov 12 / 8:46am

The <hr> Element is Stupid.

For all of the bullcrap hoops you have to jump through to style this element, it's so much simpler to just use a short div instead. It's far more flexible, it's block-level so you can do more positioning business if that inflates your date. Not to mention you don't have to do a bunch of browser-specific nonsense to control things like color (IE thinks the color of an hr is a foreground color, Firefox and Opera a background color - no clue where Webkit stands on this).

So, the next time you want to use an hr, try something like this instead:

And then margin the hell out of it to move it around. Done and freaking done, browser crap evaded.

Loading mentions Retweet

2 comments

Nov 12, 2009
solarce said...
Is that vim? what's the color scheme?
Nov 12, 2009
Brett Kelly said...
It is indeed! The theme is called inkpot - it's not included in the standard package, you can get it here: http://github.com/ciaranm/inkpot/tree/master/colors/

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     Connect     twitter