From Abkrim, 3 Years ago, written in CSS.
Embed
  1. html, body {
  2.     height: 100%;
  3. }
  4.  
  5. html {
  6.     display: table;
  7.     margin: auto;
  8. }
  9.  
  10. body {
  11.     display: table-cell;
  12.     vertical-align: middle;
  13. }