Style Sheets
  Home arrow Style Sheets arrow Page 3 - Template Presets for the Yahoo Grid 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  
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

Template Presets for the Yahoo Grid CSS
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2007-08-22

    Table of Contents:
  • Template Presets for the Yahoo Grid CSS
  • Using customized web page templates with the Yahoo Grid CSS framework
  • Building web pages with custom widths
  • Introducing the concept of web page presets

  • 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


    Template Presets for the Yahoo Grid CSS - Building web pages with custom widths


    (Page 3 of 4 )

    In the previous section, I showed you how to build a 700px width custom web page by taking advantage of the remarkable capabilities offered by the Yahoo Grid CSS framework. Now I want to walk you through the development of another concrete example to illustrate how to extend this customization process further to create a web document of 1000px width.

    As you might have guessed, the procedure for building this custom web page looks very similar to the one that I demonstrated in the previous section. It can be clearly illustrated by the following (X)HTML file:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>YUI Grid CSS - Custom 1000px width, centered</title>
    <!-- Source File -->
    <link rel="stylesheet" type="text/css"href="yui/build/grids/grids-min.css" />
    <style>
    #custom-doc{
       margin:auto;text-align:left;/* leave unchanged */
       width:76.92em;/* non-IE */
       *width:75.06em;/* IE */
       min-width:600px;/* optional but recommended */
    }
    </style>
    </head>
    <body>
    <div id="custom-doc">
    <div id="hd">
    <!-- header -->
    <h2>This is the header section</h2><p>Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam
    elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat
    volutpat. Ut dignissim, massa sit amet dignissim cursus, quam
    lacus feugiat dolor, id aliquam leo tortor eget odio.
    Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere
    eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id
    erat. Nulla facilisi. Class aptent taciti sociosqu ad litora
    torquent per conubia nostra, per inceptos hymenaeos. Nunc
    gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio
    egestas pede, ut ornare urna elit vitae mauris. Aenean
    ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec
    et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam
    ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed
    eleifend.</p>
    </div>
    <div id="bd">
    <!-- body -->
    <h2>This is the body section</h2>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in,
    rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit
    amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo
    tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis
    sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus
    vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti
    sociosqu ad litora torquent per conubia nostra, per inceptos
    hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis
    ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae
    mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus
    lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet
    diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis,
    tellus. Sed eleifend.</p>
    </div>
    <div id="ft">
    <!-- footer -->
    <h2>This is the footer section</h2>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in,
    rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit
    amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo
    tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis
    sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus
    vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti
    sociosqu ad litora torquent per conubia nostra, per inceptos
    hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis
    ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae
    mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus
    lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet
    diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis,
    tellus. Sed eleifend.</p>
    </div>
    </div>
    </body>
    </html>

    As you can see, in the above example I simply defined a "custom-doc" ID, which came in handy for building a custom 1000px width web page. As I noted in the previous section, this process doesn't require much effort from you. You only need to create these specific styles, and then calculate the appropriate width values for both non-IE and IE browsers.

    So far, so good, right? At this point, after studying all of the practical examples that I coded previously, you should have a much closer idea of how to use this helpful CSS framework to create custom web pages. Still, this library has some additional features that need to be properly reviewed, like the implementation of web page presets for building basic web page layouts very quickly,

    Therefore, in the last section of this tutorial I'm going to introduce you to the utilization of web document presets. 

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This second part of the series goes through the utilization of the different web...
     

    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 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek