Padding anomalies

by Joe Gillespie — Sep 1, 2002

The other major 'gotcha' you have to watch for is with box padding, which is counter-intuitive by specification - and most browsers get it wrong. Unlike table cells, padding for CSS boxes goes 'outside' the box size you specify, according to the official specs. Mozilla/Netscape 7 and Explorer handle this quite differently. For best multi-browser compatibility, I found that I had to avoid using padding altogether. The simple workaround is to use tall, narrow empty boxes as spacers. Digg Technorati Blinklist Furl reddit Design Float