r/programming • • Jun 24 '14

Simpsons in CSS

http://pattle.github.io/simpsons-in-css/
2.2k Upvotes

371 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jun 24 '14

[deleted]

1

u/Cuddlefluff_Grim Jun 25 '14

margin-top: auto; margin-bottom: auto;you mean.. No that does not work, auto margins only work horizontally. If you know the elements height, vertically centering something is easy, but if you don't know, it's hard to get working and impossible to do right, because there is no official right way to do it.