Style Sheets
  Home arrow Style Sheets arrow Rediscover the Hover CSS Pseudo-Class
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

Rediscover the Hover CSS Pseudo-Class
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-12-17

    Table of Contents:
  • Rediscover the Hover CSS Pseudo-Class
  • Building a sample (X)HTML page
  • Defining some simple CSS styles
  • Putting all the pieces together

  • 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


    Rediscover the Hover CSS Pseudo-Class


    (Page 1 of 4 )

    In this introductory article in a four-part series, I provide you with an elementary but illustrative example that shows how to use the “hover” CSS pseudo-class for highlighting different sections of an (X)HTML document.

    Even though the evolution of the CSS specification over the past few years has moved more slowly than expected, it’s fair to say that it has reached a level of maturity that lets web designers control with relative ease the way that web pages are rendered across several browsers.

    Underneath this pleasant and seemingly peaceful ocean, though, there’s still troubled waters that aren’t going to calm down any time soon. As you may know, there are numerous browser incompatibilities that still need to be solved, along with new and promising features that lack proper support (if any). These are serious constraints, especially when it comes to defining a consistent visual presentation of (X)HTML elements.

    However, in the middle of this problematic scenario, many web designers feel that their prayers have finally been heard, particularly by Microsoft, as the release of both Internet Explorer 7 and 8 incorporated the much-desired support for the “hover” CSS pseudo-class for most (X)HTML selectors, and not only for mere <a> elements.

    While this isn’t breaking news (Firefox and other browsers has supported this for years), this long-awaited feature now allows developers to create eye-catching effects on web pages without having to code a single piece of JavaScript, which is always an unknown, uncontrolled territory.

    With more and more users upgrading to IE 7 and 8, the use of the “hover” pseudo-class with multiple (X)HTML elements is becoming a more common practice. It's no wonder, because it can produce impressive results with minor effort, and most importantly, on a great variety of browsers.

    Given the importance of this topic, in the lines to come I’ll be demonstrating how to use the aforementioned pseudo-class in three different cases: first, for highlighting different containers of a web page; then for building pure CSS-based tooltips; and finally for building a neat drop-down menu, which you’ll be able to customize.

    Does my proposal sound interesting enough for you? Then start reading now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · At the time being, hover CSS pseudo-classes can be used in all sort of creative...
       · This is another in a series of informative articles. Keep them coming. But I want to...
       · Thanks for your comments and of course I do agree with them. Just like other...
     

    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