Home arrow Style Sheets arrow Styling the Hover State of a CSS Sprite-Based Navigation Bar
STYLE SHEETS

Styling the Hover State of a CSS Sprite-Based Navigation Bar


In this second part of a series, I show you how to use CSS sprites to create the visual style corresponding to the “hover” state of each section of the sample navigation bar. You will see that this process relies heavily on manipulating the X and Y coordinates of the bar’s background image. This requires doing some math, but nothing especially complicated.

Author Info:
By: Alejandro Gervasio
Rating: 3 stars3 stars3 stars3 stars3 stars / 2
March 02, 2010
TABLE OF CONTENTS:
  1. · Styling the Hover State of a CSS Sprite-Based Navigation Bar
  2. · Review: using CSS sprites to build a stylish navigational bar
  3. · Creating the hover state for each section of the navigation bar
  4. · Binding the CSS code to the structural markup of a web page

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Styling the Hover State of a CSS Sprite-Based Navigation Bar
(Page 1 of 4 )

Without a doubt, CSS sprites are a handy approach that can be used in a great diversity of contexts and situations due to their inherent flexibility. Even so, they really shine when you're building eye-catching navigation bars whose structure must be based on clean and standard semantic markup.

Therefore, if you’re a web designer who wants to learn how to create a couple of appealing navigational bars by taking advantage of the functionality provided by both CSS sprites and image replacement, then this series of tutorials may be the material that you need to read.

Of course, if you already had the chance to take a peek at the introductory part of this series, where I started building the first of the aforementioned navigation bars, then you probably have a clear idea of how to use the power of CSS sprites to give this user interface structure a pleasant look.

In that tutorial I explained how to define the visual presentation corresponding to the “normal” state of each section of the navigational bar by manipulating just the X and Y coordinates of a single background image. This was a pretty straightforward process if you had at least a vague idea of how to handle the  "background-position” CSS property.

Having reached that point in the construction of this example links bar, I must now demonstrate how to utilize CSS sprites to style the “hover” state of the sections comprising the bar.

That’s exactly the topic that I’ll be covering in the next few lines. Thus, to learn the full details of this new styling process, click on the link below and start reading now. 


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- 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
- Create a Simple Transitioning Link Bar with ...

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