Home arrow Style Sheets arrow Rediscover the Hover CSS Pseudo-Class
STYLE SHEETS

Rediscover the Hover CSS Pseudo-Class


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.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
December 17, 2009
TABLE OF CONTENTS:
  1. · Rediscover the Hover CSS Pseudo-Class
  2. · Building a sample (X)HTML page
  3. · Defining some simple CSS styles
  4. · Putting all the pieces together

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Rediscover the Hover CSS Pseudo-Class
(Page 1 of 4 )

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!


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