1 reply [Last post]
sproyd's picture
Melbourne, Australia
Last seen: 12 years 27 weeks ago
Melbourne, Australia
Timezone: GMT+11
Joined: 2008-10-28
Posts: 19
Points: 0

I've been using the Dreamweaver CS3 default rollover image for all my buttons but find it to be laggy and sometimes it doesn't display properly. Is there a strict CSS way to do rollover buttons that are a) image based or b) text/with changing background colour based?

the code i'm currently using is


C'mon Stupid System! Work!

CupidsToejam's picture
Last seen: 6 years 6 weeks ago
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

yes, much better way through

yes, much better way through css. one image for all states of rollover. The for the :hover state of the rollover, just change image position to reveal the other part of the graphic. study my code to see what I mean.

the home page uses this technique for the navigation, and the 1 2 3 4 5. Its very easy to achieve, and tons of fun! Remember, each state (off, hover, click, whatever) can be one graphic! You may have to save the page to retrieve all the graphics.