PDA

View Full Version : Rollover images and CSS


kirby
07-13-2005, 02:49 AM
Is it possible to specify in the css for a background image to change on rollover. An example ('http://www.howstuffworks.com/'). You'll notice at the top that each tab is a jpg that changes color upon rollover but the text on each tab is html rather than part of the jpg.

I must be overlooking something. Does anyone know how this is done?

domedia
08-23-2005, 02:31 PM
Yes you can, here's sample code:
a {background: url(off.jpg);}
a:hover {background: url(on.jpg);}