Home arrow Style Sheets arrow Page 4 - Controlling Column Padding with the Blueprint CSS Framework
STYLE SHEETS

Controlling Column Padding with the Blueprint CSS Framework


Blueprint CSS is a robust framework that lets you speed up the creation of complex web page layouts by using a grid-centric approach. It's great for distributing the contents of a web site in a harmonious, eye-pleasing fashion. The framework includes a number of source files that help you perform certain common designing tasks, such as resetting styles for most web page elements, styling text both for screen and printers, and much more. This is the fifth part of a seven-part series that explores the capabilities of the Blueprint CSS framework.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
June 04, 2009
TABLE OF CONTENTS:
  1. · Controlling Column Padding with the Blueprint CSS Framework
  2. · Review: using the append-x and prepend-x CSS classes independently
  3. · Using the prepend-x and append-x CSS classes simultaneously
  4. · Finishing the sample web page layout with Blueprint CSS’ source files

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Controlling Column Padding with the Blueprint CSS Framework - Finishing the sample web page layout with Blueprint CSS’ source files
(Page 4 of 4 )

In order to finish building the web page layout that you learned in the previous section, it’s necessary to include in the pertinent web document all of the external links that download the source files of Blueprint CSS.

The following (X)HTML file does exactly this:


<!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>

<!-- framework CSS source files-->

<link rel="stylesheet" href="blueprint/screen.css" type="text/css" media="screen, projection" />

<link rel="stylesheet" href="blueprint/print.css" type="text/css" media="print" />

<!--[if IE]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection" /><![endif]-->

</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>


Now the above web page layout has been completed. Of course, this is simply a basic example aimed at showing how to employ the “append-x” and “prepend-x” CSS classes in Blueprint. But having at your disposal all of the code samples developed in this tutorial, it should be fairly easy for you to modify them to gain a deeper understanding of how these classes can be used for positioning columns in perfect alignment with the background grid.

Final thoughts

Over this fifth chapter of the series, you hopefully enhanced your understanding of the Blueprint CSS framework, since you learned how to use its generic “prepend-x” and “append-x” CSS classes to create evened padding around selected columns of a web document.

In the forthcoming part, I’m going to explain how to push columns to the left of a web page by using another handy class bundled with Blueprint CSS. So, here’s my final recommendation: don’t miss the next article!


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials