How to Vertically-Center the WordPress Login Form on wp-login.php

So once in a lifetime or so, I might want to vertically-center the WordPress login.

Here’s the css:

html {
  height: 100%;
  margin: 0;
  padding: 0;
}
html body {
  display: table;
  margin: 0 auto;
  height: 100%;
}
body #login {
  padding: 0;
  display: table-cell;
  vertical-align: middle;
}

Enjoy!

(Read more about vertically-centering login forms.)

Posted in

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress developer, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and them to https://twitter.com/tobycryns and https://twitter.com/themightymo.com

Follow Toby's contributions on Github and WP.org.