Style Sheets
  Home arrow Style Sheets arrow Page 3 - Controlling Column Padding with the Bluepr...
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

Controlling Column Padding with the Blueprint CSS Framework
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-06-04

    Table of Contents:
  • Controlling Column Padding with the Blueprint CSS Framework
  • Review: using the append-x and prepend-x CSS classes independently
  • Using the prepend-x and append-x CSS classes simultaneously
  • Finishing the sample web page layout with Blueprint CSS’ source files

  • 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


    Controlling Column Padding with the Blueprint CSS Framework - Using the prepend-x and append-x CSS classes simultaneously


    (Page 3 of 4 )

    Using the “append-x” and “prepend-x” CSS classes simultaneously on the same web page is only a matter of assigning these classes conjunctly to a targeted column. It’s nothing more complex than that, really. Though, to clarify this concept a bit further, I’m going to modify the structural markup of the example that you saw in the previous section to create a different web page layout that uses the aforementioned classes.

    Here’s how the modified version of this example looks:


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <title>Using prepend and append classes</title>

    </head>

    <body>

    <div class="container showgrid">

    <div class="span-24">

    <h1>Using prepend and append classes</h1>

    <h2>This section spans 24 cols</h2>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

    </div>

    <div class="span-6 prepend-1 append-1">

    <h2>This section spans 8 cols</h2>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

    </div>

    <div class="span-6 prepend-1 append-1">

    <h2>This section spans 8 cols</h2>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

    </div>

    <div class="span-6 prepend-1 append-1 last">

    <h2>This section spans 8 cols</h2>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

    </div>

    <div class="span-24">

    <h2>This section spans 24 cols</h2>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

    </div>

    </div>

    </body>

    </html>


    Didn’t I tell you that working with “append-x” and “prepend-x” classes conjunctly was really simple? Well, the above code sample demonstrates that I was right. As you can see, in this case, the classes were utilized for building a typical web page layout comprised of three columns that have the same width.

    However, and here’s where things get a bit more interesting, each column aggregates a single grid unit at the beginning and at the end respectively, in this way assigning the same padding values for its left and right sides.

    Quite possibly, you’ll get a better idea of how the this example layout is displayed on the browser if you take a look at the following screen capture:



    As I said before, each of the columns included in the prior web document has the same left and right padding, while they maintain perfect alignment with the background grid. Pretty appealing and pleasant, right?

    Now that you've hopefully learned how to work at the same time with the generic “append-x” and “prepend-x” CSS classes, it’s time to incorporate the source files of this framework into the previous web document, thus completing the development of this specific web page design.

    Since the full details of this process will be covered in the concluding section of this tutorial, please click on the link below and read the new few lines.

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This fifth instalment of the series shows how to use the generic "prepend-x" and...
     

    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