Categories
css

CSS LAYER BACKGROUND IMAGE

This value sets the background-image for the entire region of the current element. This proprietary property behaves in Netscape the way the ‘background-image’ property SHOULD behave, while the actual ‘background-image’ behavior is buggy in this regard. This property was invented to create the correct behavior.

The ‘background-image’ property only covers the content area of an element’s rendering box, and if a border is also used, there is a slight gap (2-3 pixels) between the background-image and the border area, where the surface of the parent element shines through.

The ‘layer-background-image’ covers the whole region specified by the element, including the gap area occurring for the ‘background-image’ property, and the entire dimension of the element specified by the ‘width’ and ‘height’ properties. Since this property is only understood by Netscape, and it fixes other buggy behavior, specifying both this and the ‘background-image’ property with the same value seems like a good idea.

Examples
div {
position: absolute;
top: 150px; left: 200px;
width: 250px; border: thin solid red;
background-image: url(http://www.example.com/background.gif);
layer-background-image: url(http://www.example.com/background.gif);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave a Reply

Your email address will not be published. Required fields are marked *