Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: