April 30, 2003
CSS Interpretation Discrepancies
Seems like I have just found one CSS detail which Internet Explorer and Netscape interprets differently - namely the relationship between width and padding.
It seems as if Netscape uses a display width equal to the set width + padding, whereas Internet Explorer (and also Dreamweaver) will have display width equal to set width, interpreting padding as being inside not outside of width.
Example: If I have padding 10px and width 700px then the entire div will be 700px wide in Internet Explorer and 720px wide in Netscape. The problem not being evident before I, in a stack of such tags, suddenly wanted one element padding 0px...
Frustrating thing. Solved it by making another div outside of the stack which defined the width, and then removing the width tag of the div's inside it.
Posted by ludvig at April 30, 2003 02:27 AM | TrackBackLooks to me like another broken spec, and I have to give blame where blame is due --> IE
The padding applies outside the element, padding the inside data from touching the border.
XXXXXX Border XXXXXX
Posted by: Owen Marshall at July 4, 2003 04:50 AM