I used to think that Mozilla wasn't rendering border and padding properties correctly myself, but upon reading the W3C spec, I found that it is Internet Explorer, not Mozilla, that implements them incorrectly. The border and padding dimensions are added to an element's width or height; they are not applied within the specified width or height. My workaround for this is to simply leave a DIV's padding at 0px and set its left and top properties to get the desired spacing between it and adjacent elements. This results in a layout that looks the same in both browsers.
|