Home arrow Style Sheets arrow Page 3 - Creating an Artistic Blog Header with CSS Sprites
STYLE SHEETS

Creating an Artistic Blog Header with CSS Sprites


In this fourth part of a seven-part series, I build the header section of a sample blog site. It will use another set of CSS sprites -- or, in other words, a different background image -- to decorate the sections comprising its navigation bar.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
March 04, 2010
TABLE OF CONTENTS:
  1. · Creating an Artistic Blog Header with CSS Sprites
  2. · Review: building a stylish navigation bar with CSS sprites
  3. · Building the header section of a sample blog site
  4. · Spicing up the web page

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Creating an Artistic Blog Header with CSS Sprites - Building the header section of a sample blog site
(Page 3 of 4 )

As I explained in the earlier section, one of the best ways to illustrate how flexible CSS sprites can be in reality is by developing a navigation bar that has a completely different look, even though it uses the same structural markup as the previous example.

In this case, the links bar will be displayed on top of the header section of a hypothetical blog site, so in keeping with this, I’m going to create the web page containing the different sections of the site in question.

Not surprisingly, this web page will be pretty similar to the one that you saw in the preceding section. Its skeleton will look like 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=utf-8" />

<title>Artistic navigation bar using CSS sprites</title>

</head>

<body>

<div id="wrapper">

    <div id="header">

        <h1>Artistic navigation bar using CSS sprites</h1>

    </div>

    <ul id="navbar">

        <li id="about"><a href="#" class="active">About Me</a></li>

        <li id="articles" ><a href="#">Articles</a></li>

        <li id="blog"><a href="#">Blog</a></li>

        <li id="search"><a href="#">Search</a></li>

        <li id="contact"><a href="#">Contact</a></li>

    </ul>

    <div id="content">

        <h2>Main content section</h2>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor commodo risus, et ultrices sapien vestibulum non. Maecenas scelerisque quam a nulla mattis tincidunt. Etiam massa libero, pharetra vel laoreet et, ultrices non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor commodo risus, et ultrices sapien vestibulum non. Maecenas scelerisque quam a nulla mattis tincidunt. Etiam massa libero, pharetra vel laoreet et, ultrices non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor commodo risus, et ultrices sapien vestibulum non. Maecenas scelerisque quam a nulla mattis tincidunt. Etiam massa libero, pharetra vel laoreet et, ultrices non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

    </div>

    <div id="footer">

        <h2>Footer section</h2>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor commodo risus, et ultrices sapien vestibulum non. Maecenas scelerisque quam a nulla mattis tincidunt. Etiam massa libero, pharetra vel laoreet et, ultrices non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor commodo risus, et ultrices sapien vestibulum non. Maecenas scelerisque quam a nulla mattis tincidunt. Etiam massa libero, pharetra vel laoreet et, ultrices non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor commodo risus, et ultrices sapien vestibulum non. Maecenas scelerisque quam a nulla mattis tincidunt. Etiam massa libero, pharetra vel laoreet et, ultrices non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

    </div>

</div>

</body>

</html>

As you can see, the bare bones structure of this web page looks nearly the same as the one that I coded in previous parts of the series, with some subtle differences. The unordered list that the corresponding navigation bar will be seated upon has fewer items arranged in distinct categories. This is not unexpected, right?

Having already created the basic skeleton for this fictional blog site, the next logical step is to add some visual presentation to the web page sections defined so far. In the following section I’ll be defining the set of CSS styles that will accomplish this in a simple manner.

Please read the upcoming segment. It’s only one click away.


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