Style Sheets
  Home arrow Style Sheets arrow Page 3 - Creating a Three-Column Fixed Design with ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

Creating a Three-Column Fixed Design with a Simple CSS Framework
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-03-12

    Table of Contents:
  • Creating a Three-Column Fixed Design with a Simple CSS Framework
  • Review: building a two-column web page layout using the CSS framework
  • Constructing a fixed three-column web page design
  • Building a three-column fixed web page design

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating a Three-Column Fixed Design with a Simple CSS Framework - Constructing a fixed three-column web page design


    (Page 3 of 4 )

    To be frank, providing this CSS framework with the ability to build a fixed web page layout composed of three main columns is only a matter of coding a brand new CSS file. It's really that simple. Of course I could use the same file listed in the previous section to perform this task; however, I'm going to use a separate one to make it easier for you to grasp how to construct the aforementioned layout.

    Here's the CSS file, which is charged with rendering this fixed design:


    #header,#footer{

    width: 780px;

    padding: 10px;

    margin-left: auto;

    margin-right: auto;

    background: #9cf;

    }

    #navbar{

    width: 780px;

    padding: 10px;

    margin-left: auto;

    margin-right: auto;

    background: #dcdcdc;

    }

    #navbar li{

    display: inline;

    }

    #mainwrapper{

    clear: both;

    width: 800px;

    height: 100%;

    margin-left: auto;

    margin-right: auto;

    overflow: hidden;

    background: #eee;

    }

    #mainwrapper .leftcol{

    position: relative;

    float: left;

    }

    #mainwrapper .rightcol{

    position: relative;

    float: right;

    }

    #leftbar{

    width: 200px;

    }

    #centerbar{

    width: 400px;

    }

    #rightbar{

    width: 200px;

    }

    /* section title */

    .title{

    font: bold 12pt Arial, Helvetica, sans-serif;

    color: #036;

    background: #9cf;

    margin: 0;

    padding: 10px;

    }

    /* generic box */

    .box{

    background: #fff;

    border: 1px solid #ccc;

    margin-bottom: 18px;

    }

    .box h2{

    font: bold 14pt Arial, Helvetica, sans-serif;

    color: #039;

    margin: 0 0 18px 0;

    }

    .box h3{

    font: bold 13pt Tahoma, Arial, Helvetica, sans-serif;

    color: #039;

    margin: 10px 0 18px 0;

    }

    .box h4{

    font: bold 12pt Tahoma, Arial, Helvetica, sans-serif;

    color: #039;

    margin: 0 0 18px 0;

    }

    .box h5{

    font: bold 11pt Tahoma, Arial, Helvetica, sans-serif;

    color: #039;

    margin: 0 0 18px 0;

    }

    .box h6{

    font: bold 9pt Tahoma, Arial, Helvetica, sans-serif;

    color: #039;

    margin: 0 0 18px 0;

    }

    /* generic container */

    .content{

    padding: 10px;

    }

    p{

    font: normal 8pt Verdana, Arial, Helvetica, sans-serif;

    color: #000;

    margin: 0 0 18px 0;

    }


    As you can see, the above CSS file doesn't differ too much from the one shown in the prior section. Of course, the most important difference to stress here is that this last file declares an additional "#rightbar" selector, which can be used to place a third column on the right of the corresponding web document.

    Now that you hopefully grasped how the previous CSS file doe its thing, it's time to use it, right? Therefore, in the final section of this article, I'm going to show you how to use the file in question for building a fixed web page layout comprised of three primary columns.

    To learn how this example will be developed, please click on the link below and keep reading.

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This last part of the series shows how to use the previous CSS framework for...
       · Great tutorial on CSS. You have helped me a lot. I have tried all your examples, but...
       · Thanks for the words on my CSS article, and it's good to know it's been useful to...
     

    STYLE SHEETS ARTICLES

    - Building Rounded Corners with CSS3`s -webkit...
    - Using the Custom -moz-border-radius Property...
    - Using CSS3`s Border-Radius Property to Build...
    - Adding Semantic Meaning to Styled Code Block...
    - Styling Code blocks with CSS: Using pre HTML...
    - Building Rounded Corners with CSS3
    - Finishing a Casual Navigation Bar with CSS S...
    - Defining a Navigation Bar`s Hover State with...
    - Styling a Blog`s Links Bar with CSS Sprites
    - Creating an Artistic Blog Header with CSS Sp...
    - Defining the Active State of Menu Sections f...
    - Styling the Hover State of a CSS Sprite-Base...
    - Building CSS Sprite-Based Navigation Bars
    - Creating Framed Pictures with CSS
    - Using a CSS Shading Effect to Decorate Images







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 8 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek