PDA

View Full Version : issues regarding menu bar rollover



MrDaniel
March 13th, 2007, 06:04 AM
I'm using images as buttons for a menu bar, I have them all laid out but I need to make each button a roll over to show a sub menu but I just can't find out how to do this ...or if it's even possible?

Any help would be appreciated if anyone out there knows


www.dancollings.co.uk (http://www.dancollings.co.uk)

simplistik
March 13th, 2007, 09:37 AM
your down state would look like...


a { width: x; height: x; background: transparent url('linktojpg.jpg') no-repeat 0 0; }

and it's more likely than not you made two image for your seperate states instead of one large image... so you'd do


a:hover { background-image: url('linktorolloverjpg.jpg'); }

you don't need to define anything else but the image in the rollover code, because it will automatically inherit the values that I used in the resting state.

Surrogate
March 13th, 2007, 08:39 PM
http://www.alistapart.com/articles/dropdowns

Read this article, should clear it up perhaps.

A bit of DOM used in that article, but properly for the best - alternatively you could skip the list part, and make it with spans and keep it pure CSS. But that wouldn't really be correct would it now? (For those without CSS)