CSS Layers




Layers help you to assign priority to various elements that you want to use in your web page.

 

You can assign priority by assigning value to the element’s z-index. The higher the value you set, the higher the priority.

 

Here is how to do this in code:

 

H2{

            z-index: 2;

            background-color: #336699;

            }

 

p { 

            z-index: 1;

            background-color: #FFCCCC;

            }