Home arrow Style Sheets arrow Page 2 - Appending Grid Units with the Blueprint CSS Framework
STYLE SHEETS

Appending Grid Units with the Blueprint CSS Framework


If you’re searching for a friendly guide that shows you how to utilize Blueprint CSS for building your own web page designs with a grid-based approach, then begin reading this series of articles now! In this this third part to a seven-part series, you will learn a new way to use the framework's background grid with the help of the append-x class.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
May 21, 2009
TABLE OF CONTENTS:
  1. · Appending Grid Units with the Blueprint CSS Framework
  2. · Review: two-column web page design with Blueprint CSS
  3. · Using the generic append-x CSS classes
  4. · Styling the markup of the previous (X)HTML file

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Appending Grid Units with the Blueprint CSS Framework - Review: two-column web page design with Blueprint CSS
(Page 2 of 4 )

Before I start discussing how to pre-append grid columns with Blueprint CSS, I’d like to reintroduce the hands-on example created in the preceding tutorial. It demonstrated how to build a basic web page layout comprised of two primary columns, in conjunction with header and footer areas.

Here’s how the example in question looked originally:


<!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>2-column web page layout</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>2-column layout</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-16">

<h2>This section spans 16 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>

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


Although it might look rather primitive at first sight, the above code sample shows how simple it is to create a two-column web page design using the generic “span-x” CSS classes provided by Blueprint CSS. In this case, the main column was created by spanning 16 grid units, while the corresponding size bar spans the remaining 8 grid units. Not too difficult to understand, right?

Now that you hopefully recalled how to drop columns across the web document via the aforementioned “span-x” CSS classes, it’s time to continue exploring other classes given by the Blueprint CSS framework.

As I mentioned in the introduction, it’s also possible to append a certain number of grid units to a given column, which permits you to have more accurate control when positioning elements across the web document.

Therefore, in the following segment I’m going to explain how to use a brand new set of CSS classes included with Blueprint CSS, called generically “append-x,” which will perform this appending process in a straightforward manner.

To learn more about these CSS classes, please click on the link that appears below and keep reading.


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 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials