Re:CSS Absolute Centering
by lmm on Saturday August 10, 2013 @05:28PM
(#6192738)
CSS requires you to do that in plenty of other places (e.g. if you make your border 1px wider you have to make the element it's on 2px narrower.)
[ Parent
| on HN ]
Re:CSS Absolute Centering
by callmevlad on Saturday August 10, 2013 @06:16PM
(#6192879)
If you set box-sizing: border-box [1], you don't need to worry about the latter.
Even without border box you can achieve that quite easily (since the conceptual border-box 100% is the default for blocks); you simply need more wrapper elements.