Wednesday, November 21, 2012

Css Layers(z-index)

It refers to apply the z-index property to elements that overlap with each other. The z-index property when used in conjuction with the position property, enable you to specify which element should appear on top in the event of an overlap.



For example:
<div style=”backgroun-color:red;
width:100px;
height:100px;
position:relative;
top:10px;
left:80px;
z-index:2;”>
</div>

<div style=”backgroun-color:yellow;
width:100px;
height:100px;
position:relative;
top:-60px;
left:35px;
z-index:1;”>
</div>

No comments:

Post a Comment