Layout with three layers : Size and Layout « Layout « HTML / CSS






Layout with three layers

  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>CSS Positioning Example</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type='text/css'>
div#layer1 {
  z-index:1;
  position:absolute;
  top:10px; 
  left:10px;
  width:200px;
  height:100px;
  background-color:#ffffff;
  border:1px solid #000000;
  padding:5px;}

div#layer2 {
  z-index:2;
  position:absolute;
  top:20px; 
  left:20px;
  width:200px;
  height:100px;
  background-color:#ffffff;
  border:1px solid #000000;
  padding:5px;}

div#layer3 {
  z-index:3;
  position:absolute;
  top:30px; 
  left:30px;
  width:200px;
  height:100px;
  background-color:#ffffff;
  border:1px solid #000000;
  padding:5px;}
</style>


</head>

<body>
  <div id="layer1"><h1>Layer One</h1></div>
  <div id="layer2"><h1>Layer Two</h1></div>
  <div id="layer3"><h1>Layer Three</h1></div>
</body>

</html>

   
    
  








Related examples in the same category

1.Sized Absolute center aligned
2.width and height inline style
3.width height and absolute positioning
4.Stretched Absolute center aligned
5.Sized Absolute center offset
6.Stretched Absolute centered
7.Top Aligned Shrinkwrapped Static Block
8.Shrinkwrapped Absolute Top Aligned
9.Sized Static Block top offset
10.Response layout with avatar image
11.About page layout
12.About page layout 2
13.Daliy post layout
14.Quotation layout
15.Day by day post layout
16.Fixed Box Layout
17.Using Fixed height and width to create layout
18.Layout input controls with css
19.Using table to layout form controls
20.Form Layout with HTML Example
21.Site map layout
22.Poem layout
23.Nested style layout
24.Liquid Layout
25.Fixed Width Layout
26.Column span for four column layout
27.How tables linearize for layouts
28.Centering a layout horizontally
29.Creating a maximum-width layout
30.Nested Layout Example
31.Gallery layout
32.Link navigation layout
33.Link topic layout
34.Post layout
35.Three link layout
36.Center content layout
37.Card layout page
38.Even column layout
39.Box layout
40.Two column layout, 1024 pixel width
41.Content area layout
42.Code layout
43.Page layout with position:absolute;
44.Two-column layout with fixed width and height
45.Using margin to create offset for layout
46.position:fixed; layout
47.Layout with position:absolute;