From http://css-tricks.com/snippets/css/center-div-with-dynamic-height/

Center div