Home arrow Style Sheets arrow Page 2 - Pulling Web Page Elements with the Blueprint CSS Framework
STYLE SHEETS

Pulling Web Page Elements with the Blueprint CSS Framework


If you’re a web designer who’s seeking a comprehensive guide to the main features of the Blueprint CSS framework, you’ve come to the right place. Welcome to the final episode of a series that gives you a quick overview of Blueprint CSS framework. Comprised of seven friendly tutorials, this series gets you started using this robust CSS library, and shows you how to take advantage of its numerous capabilities, by means of a great variety of code samples.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
June 18, 2009
TABLE OF CONTENTS:
  1. · Pulling Web Page Elements with the Blueprint CSS Framework
  2. · Review: working with generic push-x CSS classes
  3. · Pulling elements out of a web document
  4. · Adding CSS styles to the previous example's markup

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Pulling Web Page Elements with the Blueprint CSS Framework - Review: working with generic push-x CSS classes
(Page 2 of 4 )

In case you haven't read the preceding tutorial, where I explained how to use the "push-x" CSS classes with Blueprint CSS, here's a basic example that demonstrates how to indent a few paragraphs by means of the classes in question.

The corresponding code sample is as follows:

<!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 push 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 push 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-8">

<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-16 last">

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

<p class="push-1">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 class="push-2">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 class="push-3">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>


True to form, understanding how the "push-x" classes do their thing is a very straightforward process, right? As depicted above, in this situation the classes have been assigned to three paragraphs on the web document to achieve different levels of indentation for each one. Again, it's valid to stress here that this "pushing" process is always performed with reference to the background grid, which makes all of the elements of the web document line up in perfect alignment.

So far, so good. Now that you recall how to work with the generic "push-x" classes, the next step of this tutorial will consist of explaining how to use their counterparts, the ones called "pull-x." This interesting topic will be treated in detail in the section to come; to learn more about it, please click on the link that appears below and read the following segment.


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