Style Sheets
  Home arrow Style Sheets arrow Styling the Hover State of a CSS Sprite-Ba...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

Styling the Hover State of a CSS Sprite-Based Navigation Bar
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2010-03-02

    Table of Contents:
  • Styling the Hover State of a CSS Sprite-Based Navigation Bar
  • Review: using CSS sprites to build a stylish navigational bar
  • Creating the hover state for each section of the navigation bar
  • Binding the CSS code to the structural markup of a web page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


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


    (Page 1 of 4 )

    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.

    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. 

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This second part of a series shows you how to use CSS sprites to create the visual...
     

    STYLE SHEETS ARTICLES

    - Styling Pseudo Classes with the RGBA CSS3 Pr...
    - Controlling Overall Transparency of an HTML ...
    - Altering the Border Opacity of an HTML Eleme...
    - The RGBA CSS3 Property: an Overview
    - Using Span Tags to Include Logos in Web Pages
    - Using a Single H1 Element to Include Logos i...
    - Combining Divs and H1 Elements to Include Lo...
    - Semantically Including Logos in Web Pages
    - Adding Text Indentation to Style Code Blocks...
    - Decorating Line Numbers in Code Blocks Style...
    - Changing the Color of Code Lines with CSS
    - Using Ordered Lists to Style Code Blocks wit...
    - Using a Zebra Background Effect to Style Cod...
    - Displaying Rounded Corners Built with CSS3 i...
    - Building Rounded Corners with CSS3`s -webkit...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek