Home arrow Style Sheets arrow Page 3 - Creating a Three-Column Fixed Design with a Simple CSS Framework
STYLE SHEETS

Creating a Three-Column Fixed Design with a Simple CSS Framework


Building a customizable CSS framework that allows you to create several types of web page layouts in a short time isn’t as simple at it seems, particularly if you’re taking your first steps in professional web development. However, in this group of articles you’ll be provided with some useful pointers to get you started building your own CSS framework. This is the fourth part of a four-part series; don't hesitate to start reading now!

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
March 12, 2009
TABLE OF CONTENTS:
  1. · Creating a Three-Column Fixed Design with a Simple CSS Framework
  2. · Review: building a two-column web page layout using the CSS framework
  3. · Constructing a fixed three-column web page design
  4. · Building a three-column fixed web page design

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

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.


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials