1 reply [Last post]
sproyd's picture
Melbourne, Australia
Last seen: 5 years 6 days 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
Waco, TX
Last seen: 2 years 12 weeks ago
Waco, TX
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

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.

First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS