Stacking with z-index : z index : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » z index »

 

Stacking with z-index


 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Stacking with z-index</title>
</head>
<body>
<div style="position: relative;">
  <div style="position: absolute; z-index: 2;">
    <img src="http://www.navioo.com/style/logo.png" />
  </div>
  <div style="position: absolute; top: 40px; margin-left: 70px; z-index: 1;">
    <img src="http://www.navioo.com/style/logo.png" />
  </div>
  <div style="position: absolute; margin-left: 15px; z-index: 3;">
    <h1>This is a test headline</h1>
  </div>
</div>
</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» z index