Style Sheets
  Home arrow Style Sheets arrow Page 3 - Styling Headers, Paragraphs and Main Colum...
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

Styling Headers, Paragraphs and Main Columns of DIV-Based CSS Tables
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2009-01-13

    Table of Contents:
  • Styling Headers, Paragraphs and Main Columns of DIV-Based CSS Tables
  • Review: building a basic three-column web page layout with CSS tables
  • Styling main divs, paragraphs, and headers
  • The complete source code of the three-column web page

  • 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


    Styling Headers, Paragraphs and Main Columns of DIV-Based CSS Tables - Styling main divs, paragraphs, and headers


    (Page 3 of 4 )

    As I explained in the previous section, my intention here is simply to add some additional CSS styles to certain elements of the sample web page created earlier to improve its visual appearance. In simple terms, I’m going to style the <h2> headers, paragraphs and main divs of the page in question, a process that’s performed by the following CSS code:


    body{

    padding: 0;

    margin: 0;

    background: #fff;

    }

    h2{

    margin: 0;

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

    color: #036;

    }

    p{

    font: normal 11px Tahoma, Arial, Helvetica, sans-serif;

    color: #333;

    }

    #tablewrapper{

    border-collapse: collapse;

    display: table;

    table-layout: fixed;

    }

    #navbar, #maincol, #sidebar{

    display: table-cell;

    }

    #navbar{

    width: 20%;

    padding: 15px;

    background: #ccf;

    }

    #maincol{

    width: 50%;

    padding: 15px;

    background: #eee;

    }

    #sidebar{

    width: 30%;

    padding: 15px;

    background: #9cf;

    } 


    As you can see, in this case I modified the styles that correspond to the <h2> headers, paragraphs and main divs of the sample layout created previously, making its visual presentation a bit more appealing.

    The final result of this styling process can be seen more clearly in the following image:



    That wasn’t rocket science, right? However, now the web document constructed with CSS tables looks a bit more appealing! Of course, there’s plenty of room to experiment here, and naturally you’re free to style each element of this sample web page to suit more specifically your personal preferences.

    Well, at this point, I have shown you how to apply a few basic CSS styles to certain elements of this basic web document, which has been laid out with CSS tables. Next I will show you how to tie the styles to the structural markup of the document.

    This last hands-on example will be developed in the section to come, so jump forward and keep reading.

    More Style Sheets Articles
    More By Alejandro Gervasio


       · In this third installment of the series, I’ll demonstrate how to polish the look and...
       · It took four pages to add a color spec to a <p> and three <div> tags??? Seems like...
       · Thanks for commenting. Well, that’s only your opinion which is naturally always...
     

    STYLE SHEETS ARTICLES

    - Image Replacement CSS Techniques
    - Using BlueTrip`s Success, Notice and Error C...
    - More Uses for the Thin and Caps CSS Classes ...
    - Styling Definition Lists with the BlueTrip C...
    - Styling Unordered and Ordered HTML Lists wit...
    - Using the BlueTrip CSS Framework`s Thin and ...
    - Adding Borders to Web Page Columns with Blue...
    - Introducing the BlueTrip CSS Framework
    - Using a Background Grid to Assist Web Page L...
    - Extending the Rule Of Thirds for Web Page La...
    - A Two-Column Web Page Layout Based on the Ru...
    - Using the Rule Of Thirds for Web Page Layout
    - Swapping Columns Using the Divine Ratio for ...
    - Using the Golden Ratio in Liquid Web Page De...
    - Fundamental Design Principles for Web Page L...







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