CSS Z-index

CSS Z-index:  The z-index property in CSS controls vertical stack order of elements that overlapping. Z-index Support to browsers – Google Chrome, Opera, Mozilla, IE, Safari.

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.div{
width: 300px;
height: 220px;
padding:10px;
color:#FFFFFF;
}
.zindex {
top:0;
position:absolute;
z-index:-1;
}
</style>
</head>

<body>
<div class="div">
<img src="http://codingtag.com/wp-content/uploads/2015/10/HTML-tags-9-oct.-2015.jpg" class="zindex">
<p> Pellentesque ornare, leo a suscipit hendrerit, massa tortor tempor eros, vitae aliquam dolor leo sit amet urna. Pellentesque ornare, leo a suscipit hendrerit, massa tortor tempor eros, vitae aliquam dolor leo sit amet urna. Pellentesque ornare, leo a suscipit hendrerit, massa </p>

</div>
</body>
</html>

RESULT:

css-z-index


Leave a Reply

avatar
  Subscribe  
Notify of