4 ms·
It confuses me that you have to specify things in terms of margins, I understand how that is technically correct but surely something like alignment: center sho
by jiggy2011 13y ago
It confuses me that you have to specify things in terms of margins, I understand how that is technically correct but surely something like alignment: center should just align to the center of the parent element?
I've spent hours in the past the past getting correct centring behaviour in CSS, then tried by just putting the whole thing inside <center></center> and had it work immediately in all browsers. But apparently that's "cheating".
- null_ptr 13y agoCheating according to who? Surely not your website's users? It's the standards makers' fault. Needing to center something on either the x or y axis relative to the parent is as common a scenario as you can get.
- jiggy2011 13y agoWell technically the center tag is deprecated so any browser could simply drop support for it (as they did with <blink> in a future version and break the site.