Hacker News new | past | comments | ask | show | jobs | submit login

> If anyone has a better idea for doing this without JS, please let me know.

Flexbox, with optional fallback to JS for IE 8 and 9. That said, vertical centering is almost always a nice-to-have rather than a must-have so personally I wouldn't even use a fallback.

http://philipwalton.github.io/solved-by-flexbox/demos/vertic...

http://caniuse.com/flexbox




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: