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

There is one good point in the comments: "MATH! We need math! 50% -5px It’s stupid having to do things like this in JS."

Completely agree! It should be possible to do this.

And please: vertical-align:center for any block element. Or is that in CSS3 and I am not aware of it?



You can use calc (https://developer.mozilla.org/en/CSS/calc), but it isn't well supported.




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: