A Simple CSS Trick to Vertically and Horizontally Center a Block
Centering a block horizontally is no problem. Centering an absolute positioned block has its challenges. Vertically centering anything on a page can make you pull your hair out. That is, until now.
I don’t remember where I found this solution so I appologize to whoever originated it. I’ve been using this method for about a year. Thankfully it’s short and easy to remember.
Update: I just found an article about the same exact thing!