It feels like it should be a simple task but it's easy to tie yourself in knots if you don't know any good tricks for vertical centering. Jake Archibald has two neat ways for vertically centering things in CSS.
Here's his method for modern browsers, as hosted on the collaborative code pastebin JsBin:
And here's one that works for browsers going back to IE8:
You can follow some further discussion about these and other methods on Twitter, here.
Liked this? Read these!
- Introduction to CSS selectors
- The ultimate guide to logo design
- Useful and inspiring flyer templates