Share this Page URL

Chapter 7. CSS Optimization > Optimize CSS Colors - Pg. 99

CSS Optimization 99 Padding Gotchas Because Netscape 4 doesn't extend padding out to the border, you'll get a gap between any background and the border. Use the thin styled border trick you learned in the "The background Shorthand Properties" section to force Netscape 4 to color the entire box, not just the area behind the text (see Figure 7.2). Figure 7.2. The Netscape 4 box model. Padding and widths in the same element don't mix well in Internet Explorer 4+. You are better off separating these two properties into nested divs to avoid the problem entirely. The list-style Shorthand Property The property sets the three list properties (list-style-type,