Hacker News new | ask | show | jobs
by timb 4897 days ago
It's still not precisely centered. Check out this version using a table.

http://jsfiddle.net/nJy8t/

I added a background image with a grid that extends 80px from top and bottom. There's also a small margin/padding/border reset and doctype just to make sure defaults and quirks aren't messing with anything.

1 comments

Yeah, I concede mine wasn't pixel-perfect.

To continue down this path of the "natural" way to vertically-center, font-size must also be explicitly set. This works http://jsfiddle.net/nJy8t/3/ . Though it's certainly not without it's flaws (we lose font-size cascading).