The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Incorrect Max-Width
Hello!
I’ve got a problem with max-width on images.
It does work 100% correctly when I do not use a border, but with a padding and a border, it just doesnt scale right.
take a look at this: http://img7.imagebanana.com/img/aucl2ahk/incorrect.jpg
images are centered using “margin: 24px auto”
anyone knows a solution?
Total width = Width + Padding + Border
You might be able to use the new CSS3 box-sizing method to contain everything, but browser support may be rough.
box-sizing works great and since IE got it right too, it should be fine. thanks!