Style Sheets
  Home arrow Style Sheets arrow Page 3 - Matching Columns for Fixed Web Page Layout...
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 
Sun Developer Network 
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

Matching Columns for Fixed Web Page Layouts with CSS
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2007-07-23

    Table of Contents:
  • Matching Columns for Fixed Web Page Layouts with CSS
  • Working with fixed web page layouts
  • Balancing the columns of a fixed web page
  • Building a fully-balanced fixed web page layout

  • 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


    Matching Columns for Fixed Web Page Layouts with CSS - Balancing the columns of a fixed web page


    (Page 3 of 4 )

    As I said in the previous section, I'm going to fix the previous web page layout so that it shows its columns fully matched on the browser. 

    The solution to this column-related issue, as you'll probably know, is based on redefining the generic "mainwrapper" DIV shown in the previous section so that it will wrap and position all the pertinent columns to the left and right sides of the web page. Quite simple, right?

    Having explained that, here are definitions for the set of CSS styles that perform the aforementioned tasks:

    #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;
    }

    See how easy it is to define a general containing DIV that makes the respective web page columns float to the left and right sides of the pertinent web document? At this stage, and having at our disposal such a useful piece of CSS code, the only steps required to match the columns of the web page are based on merging the previous styles with the respective structural markup into a unique (X)HTML file.

    Do you want to see how the file looks after introducing the CSS styles? Jump ahead and read the next few lines. I'll be there, waiting for you.

    More Style Sheets Articles
    More By Alejandro Gervasio


       · If you found interesting the approach followed in the previous article of the...
     

    STYLE SHEETS ARTICLES

    - Improving the Visual Presentation of a CSS D...
    - Fixing Browser Incompatibilities in a CSS Dr...
    - Building Clean Drop-Down Menus with CSS
    - Creating Hybrid Web Page Layouts with Negati...
    - Creating Three-Column Web Page Layous with N...
    - Swapping Column Positions in Web Page Layout...
    - Creating Web Page Layouts with Negative Marg...
    - Creating Gradients for Individual Containers...
    - Creating Gradients for Web Page Headers with...
    - SEO Scrolling Frames Problem Solved
    - Building Cross-Browser Background Effects wi...
    - CSS: Pseudo
    - Using PNG Images to Build Background Effects
    - CSS: Continuing the Clarification of CSS Cla...
    - CSS: Top Secret Classification






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT