B.53. layer-background-color

Longtime users of CSS Positioning will be familiar with Netscape 4's unwelcome penchant for leaving a space between the content of an absolute-positioned block and its border. This three-pixel space is in addition to the padding, and is left transparent, even if the block was assigned a background.

This little-known nonstandard property, which works only in Netscape 4, sets the background color of both the main background area as well as that three-pixel space! Although there is still no way to get rid of that three-pixel space, a browser-specific style sheet can reduce the padding by three pixels to achieve the desired rendering, as long as the intended padding of the box is at least 3 pixels!

If background-color ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.