CSS Layers


The sample code below shows how to put one layer behind another using css. The parent layer contains the image. The child layers contains the text content. In the head you will notice that there is a style for the child layer, and the only setting in it is the position attribute. The position attribute is set to absolute positioning. It’s that simple.

CSS Layers Example using Absolute Positioning
CSS Layers Example using Absolute Positioning

The above code produces the output below.

Screen shot of a an unordered list with a background image using layers.
Screen Shot Produced by the Above HTML
Advertisements