Fixed Box Layout : Size and Layout « Layout « HTML / CSS






Fixed Box Layout

   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Fixed box layout</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type='text/css'>
/*******************************************************
TITLE: Fixed Box Layout  V1.0
DATE: 20060809
AUTHOR: The CSS Tinderbox - http://www.csstinderbox.com
*******************************************************/

body {
margin:3em;
padding:0;
height:100%;
background-color:#ffffff;
color:#000000;  
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:.9em;
}

a {
color:#cc0000;
text-decoration:underline;
}

a:hover {
color:#eeeeee;
text-decoration:none;
}

blockquote {
margin:1em;
padding:.5em;
background-color:#eeeeee;
border-top:1px solid #cccccc;
border-bottom:1px solid #cccccc;
}

blockquote p {
margin:.2em;
}

#centerColumn {   
margin:0 auto;
padding:1em;
width:38em;
text-align:left;
vertical-align: middle;  
background-color:#cccccc;
border:1px solid #999999;
}

#centerColumn h2 {
margin:0 0 -.5em 0;
padding:.75em 0 0 0;
font-size:1em;
letter-spacing:.1em;
}

#header {
margin:-1em -1em 0 -1em;
padding:0 0 0 0;
height:5em;
background-color:#ffffff;
}

#header h1 {
margin:0 0 -.6em 0;
padding:.5em 0 0 1em;
font-size:1.5em;
letter-spacing:.1em;
}

#header h2 {
margin:0 0 0 0;
padding:1em 0 0 1.75em;
font-size:.9em;
font-weight:300;
letter-spacing:.1em;
}

#nav {
margin:0 0 1em 0;
padding:.4em 0 0 0;
}

#nav ul {
margin:0;
padding:0;
list-style:none;
}

#nav li {
margin:0;
padding:.25em;
display:inline;
}

#footer {
position:relative;
bottom:0;
margin:5em 0 0 0;
padding:0;
height:4em;
line-height:4em;
text-align:center;
font-size:.7em;
background-color:#cccccc;
border-top:1px solid #999999;
}













</style>


</head>
<body>
<div id="centerColumn">
  <div id="header">
    <h1>site title</h1>
    <h2>fixed box layout</h2>
  </div>
  <!--//end #headern//-->
  <div id="nav">
    <ul>
      <li><a href-"#">Home</a></li>
      <li><a href-"#">About</a></li>
      <li><a href-"#">Gallery</a></li>
      <li><a href-"#">Contact</a></li>
    </ul>
  </div>
  <!--//end #nav//-->
  <h2>centerColumn</h2>
  <p>Augur et fulgente decorus arcu Phoebus acceptusque novem Camenis, qui salutari levat arte fessos corporis artus, si Palatinas videt aequos aras remque Romanam Latiumque felix alterum in lustrum meliusque semper prorogat aevom, quaeque Aventinum tenet Algidumque, quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
  <h2>Header 2</h2>
  <p><a href="#">Link Item</a></p>
  <ul>
    <li>List Item</li>
    <li>List Item</li>
    <li>List Item
      <ul>
        <li>List Item</li>
        <li>List Item</li>
      </ul>
    </li>
  </ul>
  <blockquote>
    <p><strong>blockquote</strong><br />
      Augur et fulgente decorus arcu Phoebus acceptusque novem Camenis, qui salutari levat arte fessos corporis artus.</p>
  </blockquote>
  <div id="footer"> <a target="_blank" href="http://validator.w3.org/" title="W3C HTML Validation">XHTML</a> | <a target="_blank" href="http://jigsaw.w3.org/css-validator/validator-uri.html" title="W3C CSS Validation">CSS</a> | <a target="_blank" href="http://www.w3.org/TR/WCAG10/" title="Web Content Accessibility Guidelines">WCAG</a> | <a target="_blank" rel="nofollow" href="http://www.csstinderbox.com">The CSS Tinderbox</a> </div>
  <!--//end #footer//-->
</div>
<!--//end #centerColumn//-->
</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.Using Fixed height and width to create layout
17.Layout input controls with css
18.Using table to layout form controls
19.Form Layout with HTML Example
20.Site map layout
21.Poem layout
22.Nested style layout
23.Liquid Layout
24.Fixed Width Layout
25.Column span for four column layout
26.How tables linearize for layouts
27.Centering a layout horizontally
28.Creating a maximum-width layout
29.Nested Layout Example
30.Gallery layout
31.Link navigation layout
32.Link topic layout
33.Post layout
34.Three link layout
35.Center content layout
36.Card layout page
37.Even column layout
38.Box layout
39.Two column layout, 1024 pixel width
40.Content area layout
41.Code layout
42.Page layout with position:absolute;
43.Two-column layout with fixed width and height
44.Using margin to create offset for layout
45.Layout with three layers
46.position:fixed; layout
47.Layout with position:absolute;