Style Sheets
  Home arrow Style Sheets arrow Swapping Column Positions in Web Page Layo...
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

Swapping Column Positions in Web Page Layouts with Negative Margins
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2008-08-26

    Table of Contents:
  • Swapping Column Positions in Web Page Layouts with Negative Margins
  • Review: using negative margins to build a two-column liquid design
  • Swapping the position of web page columns
  • The complete source code for the previous two-column liquid 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


    Swapping Column Positions in Web Page Layouts with Negative Margins


    (Page 1 of 4 )

    In this second part of a four-part series on using negative margins to create DIV-based web page layouts, we're going to expand on what we learned in the first article by actually switching the positions of the columns of our sample web page. Keep reading to learn how.

    Introduction

    As you possibly know, building DIV-based web page layouts has become the goal of many web designers who wish to adhere to the standards dictated by the W3 Consortium. Naturally, this has empowered the development of different approaches aimed at building web sites with the table-less paradigm in mind.

    Of course, it’s quite probable that you’ve already used some DIVs to create web page layouts that are displayed consistently across distinct browsers, by floating the boxes to the left and the right of a web document. However, one of the best things about designing web sites using only DIVs is that they can be utilized in many clever ways, meaning that it’s possible to construct both fixed and liquid designs with relative ease.

    Among the variety of approaches that can be used to build DIV-based web page layouts, there’s one in particular that deserves a closer look, because of its easy learning curve. I’m talking about using negative CSS margins to position the main containers of a given web document, certainly a technique that has gained numerous advocates over time.

    Therefore, if you wish to learn the full details of how to put this handy approach to work for you, then this article series might be what you’re looking for. In it, you’ll find numerous and instructive hands-on examples aimed at providing you with the right pointers to start building DIV-based web page layouts by means of CSS negative margins.

    Now that I introduced you to the main subject of this series, let me refresh briefly the topics that were discussed in the first article. In that particular installment, I showed you how to create a basic two-column web page layout by specifying a negative value for the right margin of the main column, in this way pulling it away from the side bar. Does this example ring any bells? I bet it does!

    However, the web page layout is only an introductory example of what you can do using negative margins. Actually, it’s quite simple to extend this approach to build web document layouts where the positions of the respective columns are inverted. In this second part of the series I’ll be teaching you how to achieve this with minor hassles.

    So, are you ready to continue this educational journey and learn how to use negative margins to create consistent web page layouts? Let’s get started now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · In the introductory part of this series, negative CSS margins were employed to...
     

    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 1 hosted by Hostway
    Stay green...Green IT