Style Sheets
  Home arrow Style Sheets arrow Defining a Navigation Bar`s Hover State wi...
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

Defining a Navigation Bar`s Hover State with CSS Sprites
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2010-03-08

    Table of Contents:
  • Defining a Navigation Bar`s Hover State with CSS Sprites
  • Review: using CSS sprites to define the blog navigation bar's normal state
  • Defining the navigation bar's hover state
  • Linking the CSS code to the blog's markup

  • 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


    Defining a Navigation Bar`s Hover State with CSS Sprites


    (Page 1 of 4 )

    In this penultimate part of the series, I show how to use the previous CSS sprite background image to define the look of a casual, artistic blog navigation bar in its “hover” state. The simple styling process shouldn't give you any major problems when you use this approach to build a navigation bar for your own websites.

    Among the diversity of techniques that can be applied nowadays in the development of modern websites, CSS sprites are definitively one of the most popular with many web designers, as they allow you to build with relative ease several interfacing elements, such as navigational bars, interactive HTML forms and so forth by using something as trivial as a single background image.

    Even though the logic that stands behind CSS sprites is remarkably simple, the clever manipulation of the background graphic assigned to a given HTML element through its X and Y coordinates permits you to create appealing, highly-responsive graphic interfaces without having to rely on JavaScript.

    To demonstrate how useful CSS sprites can be in a real-world project, in the  previous installment I started constructing the navigational bar of a sample blog site. The example made use of a background image to define the visual presentation of the “normal,” “hover” and “active” states of its sections, all in one go.

    Admittedly, the example links bar in its current version is entirely functional, but the CSS code developed so far was used only to style its “normal” state. This doesn't leverage the full potential of its CSS sprite image. To address this issue, in this penultimate part of the series I’ll be adding to the landing page of this fictional blog site the CSS styles required to define the look of the bar when the mouse is placed over its sections.

    Are you ready to learn how this styling process will be accomplished via CSS sprites? Then click on the link below and start reading right now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This chapter of the series shows how to use CSS sprites, this time for defining the...
     

    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 10 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek