Home arrow Style Sheets arrow Page 3 - Using BlueTrip`s Success, Notice and Error CSS Classes
STYLE SHEETS

Using BlueTrip`s Success, Notice and Error CSS Classes


Welcome to the final installment of a series on the BlueTrip CSS framework. Made up of seven comprehensive tutorials, this series shows you how to master the main CSS classes that come bundled with BlueTrip through a decent variety of code samples.

Author Info:
By: Alejandro Gervasio
Rating: 3 stars3 stars3 stars3 stars3 stars / 4
November 19, 2009
TABLE OF CONTENTS:
  1. · Using BlueTrip`s Success, Notice and Error CSS Classes
  2. · Displaying successful messages with BlueTrip
  3. · Showing notices and warnings with BlueTrip
  4. · Displaying errors

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using BlueTrip`s Success, Notice and Error CSS Classes - Showing notices and warnings with BlueTrip
(Page 3 of 4 )

Showing notices and warnings: working with the "notice" CSS class

As its name implies, the "notice" CSS class provided by BlueTrip is used for displaying notices and warnings. That's it. So what is the difference between this one and the "successful" class discussed in the previous section? Well, not much really, since when an element is styled with the "notice" class, it'll be assigned a yellow background color.

The code sample below shows how to use this CSS class with a few paragraphs:

<!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>Basic example on using BlueTrip (using notice class)</title>

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

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

<!--[if IE]>

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

<![endif]-->

</head>

<body>

<div class="container">

<div class="span-24">

<h1 class="caps">BlueTrip CSS Grid example using notice class</h1>

</div>

<div class="span-8">

<h2 class="caps">Level 2 heading</h2>

<h3 class="caps">Level 3 heading</h3>

<p class="notice">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 class="caps">Level 2 heading</h2>

<h3 class="caps">Level 3 heading</h3>

<p class="notice">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 class="caps">Level 2 heading</h2>

<h3 class="caps">Level 3 heading</h3>

<p class="notice">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 class="caps">Level 2 heading</h2>

<h3 class="caps">Level 3 heading</h3>

<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 class="caps">Level 2 heading</h2>

<h3 class="caps">Level 3 heading</h3>

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

If you examine the above example, you'll realize that it looks nearly identical to the one created in the preceding segment, except for one subtle difference: there are three paragraphs that have been assigned the "notice" CSS class.

Logically, the code sample itself won't tell you much about how these paragraphs look, but the following image should dissipate any possible doubts that you might have:

As you can see, the "notice" CSS class should be utilized for displaying some kind of warning on a web site in the appropriate cases, and it can be easily enhanced by adding custom styles as well.

So far, so good. Now that you've grasped the logic that stands behind applying "notice" CSS classes to elements of a web document, it's time to examine another default CSS class bundled with BlueTrip. In this  case, I'm talking about the "error" class, which should be used for displaying error messages on a web page.

This topic will be discussed in depth in the last section of this article. 


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