Hacker News new | ask | show | jobs
by bonn1 4125 days ago
> Vertical centering has been relatively easy since CSS 2.1 (Table model)

But not with divs which are more common

2 comments

It's not hard, really: just use absolute centering [1]. That's actually what "margin: auto" is there for in CSS 2.1; it's a shame they were bad at evangelizing it.

[1]: http://codepen.io/shshaw/full/gEiDt

…so you use table display rules on the divs?