programming-examples/css/DIV tag Stacking with z-index.html

22 lines
772 B
HTML
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<!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>Div Tag Stacking With z-index</title>
</head>
<body>
<div style="position: relative;">
<div style="position: absolute; z-index: 2;">
<img src="http://www.happycodings.com/images/happy.gif" />
</div>
<div style="position: absolute; top: 80px; margin-left: 60px; z-index: 1;">
<img src="http://www.happycodings.com/images/happy.gif" />
</div>
<div style="position: absolute; margin-left: 20px; z-index: 3;">
<h1>Programming Code Examples</h1>
</div>
</div>
</body>
</html>