Style Sheets
  Home arrow Style Sheets arrow DIV Based Layout with CSS
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  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
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

DIV Based Layout with CSS
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 231
    2004-12-21

    Table of Contents:
  • DIV Based Layout with CSS
  • The table-based approach
  • The mighty DIV tag
  • Fixed layout design with fixed boxes
  • Three-column fixed layout
  • Fixed layout design with floating boxes
  • Adding a right column
  • Liquid design with floating boxes
  • Three-column liquid layout with floating boxes

  • 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


    DIV Based Layout with CSS


    (Page 1 of 9 )

    Most Web page designers use a table-based layout to achieve a coherent and consistent look. There's a different way to achieve the same look. Using CSS and DIV tags reduces markup code, speeds up page downloads, separates content from its visual presentation, and brings your code closer to Web standards compliance--all while making your website more appealing to search engine spiders. Alejandro Gervasio explains how it's done, with copious examples.

    Introduction

    We see it every day. As we surf the huge network of the Web, we are able to appreciate several page layouts through different websites. They run the gamut from classical but highly effective two and three-column designs, to those exotic and certainly uncommon designs which seem not to fall into a specific category.

    For many years, Web designers have been sticking firmly to table-based layouts, achieving coherent and consistent looks by the use of complex table nesting techniques, gif spacers and other well-known design processes. Currently, table layout still continues to have a strong presence on the Web, since it provides wide cross-browser compatibility. Tables are pretty well supported elements for browsers, and that’s an extremely powerful reason to use them for Web page layouts. But this strong compatibility comes with an extra cost. Most of the time, nested tables introduce lots of additional markup, and increase file size, download times and server requests when using graphics as spacers, even if they are cached later.

    Extra HTML pushes the important content farther down in the source code, making it less likely that a search spider will give Web pages a high relevance score for the keywords. With the use of CSS and DIV tags, we can achieve the same table-based layout effects, reduce our markup code noticeably, get faster page downloads, and separate content from its visual presentation. We are getting closer to standards-compliant code, and our Web pages are more appealing to search engine spiders.

    Now, is everything good about CSS? No, unfortunately. The major drawback with CSS is that browsers don’t display reliably some CSS rules because most of them are not completely compliant with Web standards. Still, the advantages of using CSS and DIV tags for page layout are numerous, and certainly are appealing to many Web designers, as modern browsers add more reliable support.

    With the pros and cons in our hands, let’s see the basics of how table design works.

    More Style Sheets Articles
    More By Alejandro Gervasio


       ·  Concerning to webpage layout, althougt tables are the most used elements, a CSS...
       · Its definately more accessible.Keep tables for tabular data, not...
       · I've read the article and esp. the last page ("Three-column liquid layout with...
       · Jacob - you could give the left and right menu div's (not cells!) fixed widths, then...
       · The nice thing about designing with tables is that the heights of all columns in a...
       · Another nice thing about designing with tables is the fact that people with...
       · In regards to the "Three-Column Liquid Layout With Floating Boxes", is it possible...
       · Hi,Regarding your question, yeap, it's possible set fixed sizes to left and...
       · Check this article out on alistapart...
       · Just define #leftcol and #rightcol in pixel width and #content width:auto - like...
       · its bad to use position/presentation words in your IDs and class names... words such...
       · Hi there,I agree with your naming concepts. It's only for example...
       · Nice attack!
       · This seems to be a trend with your articles - "only for example sake". You should...
       · Dear Sr.Your comments and suggestions are very welcome. In fact, every time I...
       · I'm not sure what youre reply means, but if anything, seperation of application...
       · I get your point of view, and it's right.I liked your naming examples, showed...
       · tried your fixed width left and right cols and it breaks in Safari. when content...
       · Regarding the solution proposed by the previous poster, that won't work on Safari,...
       · I agree with the above concept too.
       · How do I center the page as a whole when using div tags?
       · Hello,There are numerous methods to center a page so you may want to select a...
       · I pretty much followed the instructions, haven't put css in separate sheetyet but...
       · Just a little word about fixed size.Using pixel size (px) for dimension is as...
       · Thank you for commenting on my DIV-based layout article. Also, I found your opinions...
       · How do you put your CSS in a separate page and still have it work with the current...
       · Thank you for the comments on my CSS article. Regarding your question, first save...
       · Short of having a fixed width container, I wonder if its possible to use the float...
       · Thank you for commenting on my article. With reference to your question, yes,...
       · Relax, Yodah. Not everyone is designing a site for the blind.
       · Thank you for posting your the comments on my DIV-layout article. They're greatly...
       · Not only is that incorrect, but it was god-awful rude.In truth, tabled design IS...
       · this is international level class and id name
       · Thank you for the comments on my article. They're greatly...
       · Very nice article. I learn new thing today.But sometimes we need merged cells and...
       · Thank you for commenting on my article, and it’s good to know it’s been useful to...
       · I have not agree your commd
       · Thank you for posting your comments on my CSS article. And I’m glad to see it...
       · really great article! It helped me a lot to understand the concepts of div...
       · Thank you for the kind comments on my CSS article. Also, it’s good to know it’s been...
       · A table does not leave you with a fixed layout. Why not use tables and make them...
       · Thanks for posting your comments on my CSS article. Yes, liquid tables are great and...
       · This article was helpful. Thanks very much. One feature that I would like to...
       · Thank you for the kind comments on my article. Concerning your question, you may...
       · Is this possible that the header is fluid - 100%, the right and left columns are 19%...
       · Thank you for the comments on my article. Concerning your question, yes, it's...
       · With http://www.quirksmode.org/css/centering.html received a 404 not found error...
       · Thank you for commenting on my CSS article. Since the above link was posted a few...
       · DIV based design is the correct thing to do while designing a web site that should...
       · Thank you for commenting on my article. Yes, divs are by far more accessible than...
     

    STYLE SHEETS ARTICLES

    - 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
    - CSS: Dimensions
    - CSS: Margins and Padding
    - CSS: Crossing the Border
    - CSS: Text, Fonts, and Tables







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