Three column layout : three Columns « Layout « HTML / CSS






Three column 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>Citrus Island</title>

<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="author" content="Erwin Aligam - styleshout.com" />
<meta name="description" content="Site Description Here" />
<meta name="keywords" content="keywords, here" />
<meta name="robots" content="index, follow, noarchive" />
<meta name="googlebot" content="noarchive" />

<style type='text/css'>
/* ------------------------------------------------------

   AUTHOR           :    Erwin Aligam
   WEBSITE          :   http://www.styleshout.com/
   TEMPLATE NAME    :   Citrus Island
   TEMPLATE CODE    :   S-0004
   VERSION          :   1.2
   LAST DATE MOD    :   January 20, 2010

--------------------------------------------------------- */
 
/* ------------------------------------------------------
   HTML ELEMENTS
--------------------------------------------------------- */

/* top elements */
* { margin:0; padding: 0; outline: 0; }

body {
  margin: 0; padding: 0;
  font: 11px/1.6em  Verdana, Tahoma, Arial,sans-serif;
  color: #555;
  background: #FFF url(CitrusIsland-images/bg.gif) repeat-x;  
  text-align: center; 
}

/* links */
a:link, a:visited {
  color: #F9864D; 
  background-color: inherit;
  text-decoration: none;
}
a:hover {
  color: #575757;
  background-color: inherit;
}

/* headers */
h1, h2, h3 {
  font-family: 'Trebuchet MS', Tahoma, Verdana, Sans-serif;
  font-weight: Bold;     
}
h1 {
  font-size: 145%;
  padding: 10px 10px 5px 10px;
  color: #75A54B;
  background-color: inherit;
  border-bottom: 1px solid #EFF0F1;    
}
h2 {
  font-size: 125%;
  text-transform: uppercase;
}
h3 {
  font-size: 125%;  
  color: #404040;
}

h2, h3, p {
  padding: 10px;    
  margin: 0;
}

/* images */
img {
  background: #FAFAFA;
    border: 1px solid #DCDCDC;
  padding: 8px;
}
img.float-right {
  margin: 5px 0px 5px 10px;  
}
img.float-left {
  margin: 5px 10px 5px 0px;
}

#sidebar h1, 
#sidebar p {
  padding-left: 0;
}

ul, ol {
  margin: 10px 20px;
  padding: 0 20px;
}

code {
  margin: 5px 0;
  padding: 15px;
  text-align: left;
  display: block;
  overflow: auto;  
  font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace;
  /* white-space: pre; */
  background: #FAFAFA;
  border: 1px solid #f2f2f2;  
  border-left: 4px solid #FF9966;
}
acronym {
  cursor: help;
  border-bottom: 1px solid #777;
}
blockquote {
  margin: 10px;
   padding: 10px 15px 10px 32px;
    background: #FAFAFA url(CitrusIsland-images/quote.gif) no-repeat 8px 10px !important;
  background-position: 10px 10px;
  border: 1px solid #f2f2f2; 
  border-left: 4px solid #FF9966;
    font-weight: bold;
}

/* form elements */
form {
  margin:10px;
    padding: 10px;
  border: 1px solid #f2f2f2; 
  background-color: #FAFAFA; 
}
label {
  display:block;
  font-weight:bold;
  margin:5px 0;
}
input {
  padding: 4px 5px;
  border:1px solid #eee;
  font: normal 1em Verdana, sans-serif;
  color:#777;
}
textarea {
  width:350px;
  padding:4px 5px;
  font: normal 1em Verdana, sans-serif;
  border:1px solid #eee;
  height:100px;
  display:block;
  color:#777;
}
input.button { 
  margin: 0; 
  font: bolder 12px Verdana, Sans-serif; 
  border: 1px solid #CCC; 
  padding: 4px 5px;
  background: #FFF;
  color: #75A54B;
}
/* search form */
form.search {
  position: absolute;
  top: 15px; right: 5px;
  padding: 0; margin: 0;
  border: none;
  background-color: transparent; 
}
form.search input.textbox { 
  margin: 0; 
  width: 120px;
  border: 1px solid #CCC; 
  background: #FFF;
  color: #333;   
  vertical-align: top;
}
form.search input.button {
  width: 60px;
  vertical-align: top;
}

/* -------------------------------------
   LAYOUT
---------------------------------------- */
#wrap {
  margin: 0 auto; 
  padding: 0; 
  width: 850px;
  text-align: left;
}

/* header */
#header { 
  position: relative;
  height: 70px; 
  margin: 0; padding: 0;
  color: #808080;     
}
#header h1#logo {
  position: absolute;  
  font: bold 3.9em "trebuchet MS", Arial, Tahoma, Sans-Serif;
  margin: 0; padding:0;
  color: #75A54B;
  letter-spacing: -2px;  
  border: none;  
  
  /* change the values of top and Left to adjust the position of the logo*/
  top: 0; left: 2px;    
}
#header h1#logo span { color: #F18359; }

#header h2#slogan { 
  position: absolute;
  margin: 0; padding: 0;  
  font: bold 11px Arial, Tahoma, Sans-Serif;
  text-transform: none;
  
  /* change the values of top and Left to adjust the position of the slogan*/
  top: 43px; left: 45px;
}

/* menu */
#menu {
  clear: both;
  background: #FF9966 url(CitrusIsland-images/menubg.gif) repeat-x;
  height: 30px;
  margin: 0;
  font: bolder 1.2em/30px Tahoma, Verdana, Arial, Sans-Serif;    
}
#menu ul{
  margin: 0; padding: 0 0 0 8px;
}
#menu ul li {
  float: left;
  list-style: none;    
  border-right: 1px solid #FFA500;
}
#menu ul li a {
  display: block;
  text-decoration: none;  
  padding: 0 15px;
  color: #FFF;  
}
#menu ul li a:hover {
    color: #333;  
  background: url(CitrusIsland-images/menu-hover-bg.gif) repeat-x;
}
#menu ul li#current a {
  color: #333;
  background: url(CitrusIsland-images/menu-current-bg.gif) repeat-x;  
}

/* sidebar */
#sidebar {
  float: left;
  width: 21%;
  margin: 20px 0;
    padding: 0;
  display: inline;
}
#sidebar ul.sidemenu {
  list-style: none;
  text-align: left;
  margin: 0 0 7px 0; padding: 0;
  text-decoration: none;  
}
#sidebar ul.sidemenu li {
  border-bottom: 1px solid #EFF0F1;  
  background: url(CitrusIsland-images/arrow.gif) no-repeat 3px 8px;
  padding: 3px 5px 3px 20px;
}

* html body #sidebar ul.sidemenu li { height: 1%; }

#sidebar ul.sidemenu li a {
  font-weight: bolder;
  background-image: none;
  text-decoration: none;  
}

#rightbar {
  float: right;
  width: 21%;
  padding: 0;
  margin: 20px 0;
}

/* main column */
#main {
  float: left;
  margin: 20px 0 20px 15px;
  padding: 0;
  width: 54%;  
}

.post-footer {
  background-color: #FAFAFA;
  padding: 5px; margin: 15px 10px 10px 10px;
  border: 1px solid #f2f2f2; 
  font-size: 95%;
}
.post-footer .date {
  background: url(CitrusIsland-images/clock.gif) no-repeat left center;
  padding-left: 20px; margin: 0 10px 0 5px;
}
.post-footer .comments {
  background: url(CitrusIsland-images/comment.gif) no-repeat left center;
  padding-left: 20px; margin: 0 10px 0 5px;
}
.post-footer .readmore {
  background: url(CitrusIsland-images/page.gif) no-repeat left center;
  padding-left: 20px; margin: 0 10px 0 5px;
}

/* footer */
#footer { 
  clear: both;   
  color: #666666;   
  padding: 0;   
  background: #FFF url(CitrusIsland-images/footerbg.gif) repeat-x;
  height: 60px;

}
#footer a { 
  text-decoration: none; 
  font-weight: normal;
}
#footer-content {
  margin: 0 auto;
  width: 800px
}
#footer-content #footer-left {
  padding: 10px;
  width: 60%;
  float: left;
  text-align: left;
}
#footer-content #footer-right {
  padding: 10px;
  width: 35%;
  float: right;
  text-align: right;
}

/* alignment classes */
.float-left  { float: left; }
.float-right { float: right; }
.align-left  { text-align: left; }
.align-right { text-align: right; }

/* additional classes */
.clear  { clear: both; }
.green  { color: #75A54B; }

</style>



</head>

<body>
<div id="wrap"><!-- wrap starts here -->
    
  <div id="header">

    <form method="post" class="search" action="#">
      <p>
      <input name="search_query" class="textbox" type="text" />
        <input name="search" class="button" value="Search" type="submit" />
      </p>
    </form>
                
    <h1 id="logo">citrus<span>island</span></h1> 
    <h2 id="slogan">put your website slogan here...</h2>
          
  </div>
    
  <div id="menu">
    <ul>
      <li id="current"><a href="index.html">Home</a></li>
      <li><a href="index.html">News</a></li>
      <li><a href="index.html">Downloads</a></li>
      <li><a href="index.html">Services</a></li>
      <li><a href="index.html">Support</a></li>
      <li><a href="index.html">About</a></li>      
    </ul>    
  </div>          
  
  <div id="sidebar" >
  
    <h1>Sidebar Menu</h1>
    <ul class="sidemenu">
      <li><a href="index.html">Home</a></li>
      <li><a href="#TemplateInfo">Template Info</a></li>
      <li><a href="#SampleTags">Sample Tags</a></li>
      <li><a href="http://www.styleshout.com/">More Free Templates</a></li>  
      <li><a href="http://www.buywebtemplates.net" title="Web Templates">Web Templates</a></li>
    </ul>
      
    <h1>Sponsors</h1>
    <ul class="sidemenu">
            <li><a href="http://www.dreamtemplate.com" title="Website Templates">DreamTemplate</a></li>
            <li><a href="http://www.themelayouts.com" title="WordPress Themes">ThemeLayouts</a></li>
            <li><a href="http://www.imhosted.com" title="Website Hosting">ImHosted.com</a></li>
            <li><a href="http://www.dreamstock.com" title="Stock Photos">DreamStock</a></li>
            <li><a href="http://www.evrsoft.com" title="Website Builder">Evrsoft</a></li>
            <li><a href="http://www.ehostinfo.com/" title="Web Hosting">Web Hosting</a></li>
    </ul>
        
    <h1>Wise Words</h1>
    <p>&quot;To know what you know and know what you don't know is 
    the characteristic of one who knows&quot;</p>
    
    <p class="align-right">- Confucius</p>
    
  </div>
    
  <div id="main">
      
    <a name="TemplateInfo"></a>
    <h1>Template Info</h1>
        
        <p><strong>Citrus Island</strong> is a free, W3C-compliant, CSS-based website template
        by <a href="http://www.styleshout.com/">styleshout.com</a>. This work is
        distributed under the <a rel="license" href="http://creativecommons.org/licenses/by/2.5/">
        Creative Commons Attribution 2.5  License</a>, which means that you are free to
        use and modify it for any purpose. All I ask is that you give me credit by including a <strong>link back</strong> to
        <a href="http://www.styleshout.com/">my website</a>.
        </p>

        <p>
        You can find more of my free template designs at <a href="http://www.styleshout.com/">my website</a>.
        For premium commercial designs, you can check out
        <a href="http://www.dreamtemplate.com" title="Website Templates">DreamTemplate.com</a>.
        </p>
        
    <p class="post-footer">
      <a href="index.html" class="readmore">Read more</a>
      <a href="index.html" class="comments">Comments (7)</a>
      <span class="date">Oct 11, 2006</span>  
    </p>
      
    <a name="SampleTags"></a>        
    <h1>Sample Tags</h1>
        
    <h3>Code</h3>        
    <p><code>
    code-sample { <br />
    font-weight: bold;<br />
    font-style: italic;<br />        
    }
    </code></p>  
        
    <h3>Example Lists</h3>
        
    <ol>
      <li>example of</li>
      <li>ordered list</li>                
    </ol>  
              
    <ul>
      <li>example of</li>
      <li>unordered list</li>                
    </ul>        
        
    <h3>Blockquote</h3>      
    <blockquote><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy 
    nibh euismod tincidunt ut laoreet dolore magna aliquam erat....</p></blockquote>
        
    <h3>Image and text</h3>
    <p><a href="http://getfirefox.com/"><img src="images/firefox-gray.jpg" width="100" height="120" alt="firefox" class="float-left" /></a>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero. Suspendisse bibendum. 
    Cras id urna. Morbi tincidunt, orci ac convallis aliquam, lectus turpis varius lorem, eu 
    posuere nunc justo tempus leo. Donec mattis, purus nec placerat bibendum, dui pede condimentum 
    odio, ac blandit ante orci ut diam. Cras fringilla magna. Phasellus suscipit, leo a pharetra 
    condimentum, lorem tellus eleifend magna, eget fringilla velit magna id neque. Curabitur vel urna. 
    In tristique orci porttitor ipsum. Aliquam ornare diam iaculis nibh. Proin luctus, velit pulvinar 
    ullamcorper nonummy, mauris enim eleifend urna, congue egestas elit lectus eu est.         
    </p>
                
    <h3>Example Form</h3>
    <form action="#">    
      <p>        
      <label>Name</label>
      <input name="dname" value="Your Name" type="text" size="30" />
      <label>Email</label>
      <input name="demail" value="Your Email" type="text" size="30" />
      <label>Your Comments</label>
      <textarea rows="5" cols="5"></textarea>
      <br />  
      <input class="button" type="submit" />    
      </p>    
    </form>        
    <br />            
              
  </div>  
  
  <div id="rightbar">
  
    <h1>Support Styleshout</h1>
    <p>If you are interested in supporting my work and would like to contribute, you are
    welcome to make a small donation through the 
    <a href="http://www.styleshout.com/">donate link</a> on my website - it will 
    be a great help and will surely be appreciated.</p>
  
    <h1>Header Text</h1>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod 
    tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, 
    quis nostrud exerci tation ullamcorper suscipit... </p>    
        
      
  </div>    
  
</div><!-- wrap ends here -->  
  
<!-- footer starts here -->  
  <div id="footer">
    <div id="footer-content">
    <div id="footer-right">
      <a href="index.html">Home</a> |    
      <a href="index.html">Site Map</a> |
           <a href="index.html">RSS Feed</a> |
            <a href="http://validator.w3.org/check/referer">XHTML</a> |
           <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
    </div>
    
    <div id="footer-left">
      &copy; 2010 Your Company |
      Design by <a href="http://www.styleshout.com/">styleshout</a>

      | <a href="http://www.cssportal.com/">CSS Portal</a></div>
    </div>  
  </div>
<!-- footer ends here -->  
  
</body>
</html>

   
    
    
  








Related examples in the same category

1.Header and three columns under
2.Column left, column main, column right
3.Three columns with navigation on the right
4.Use left property to control the column position
5.three column layout with header and footer
6.Three column layout with absolute position
7.Use absolute position to create header and three column under it
8.Use margin to layout the center column
9.Three columns, left and right column has abolute position
10.3 columns, all fluid
11.3 column
12.3 Column fluid layout: 50% column, 2 x 25% columns
13.3 column fluid layout - 33% columns
14.3 Column fluid layout - 25% side columns
15.Three Column Elastic Layout
16.Floated Three Column Layout
17.Three Column Hybrid Layout
18.Three Column Liquid Layout
19.Floated Three Column Layout 2
20.Faux Three Column Liquid Layout
21.Three-Column Layout Demonstration with Javascript
22.Three-Column Layout Demonstration with fixed width
23.Three-Column Layout without footer
24.Three-Column Layout with absolute position
25.Three columns: all floating from left
26.Header and sub header with three columns
27.Three columns with header and footer
28.Three columns with no header and footer
29.Three column layout with sub sections
30.float left and right three columns
31.Top and left navigational bar and three columns
32.Three Column Layout in CSS
33.Three Column Design Using HTML with Table
34.Basic 3-Column Sample Page
35.Three column with top section
36.Three column layout with two sidebar on the right
37.Three column layout with two column sidebar on the left
38.Three column layout
39.Fixed Three-Column Over Four-Column Layout
40.Three column layout with content in the middle
41.Three column layout with left navigation bar
42.Three column layout with left menu bar
43.Three column daliy post layout
44.Column span for three column layout
45.Three Column Layout in CSS 2
46.Three column layout with top bar
47.Three-column layout with various style illustration