PDA

View Full Version : Text and background rollovers


scan
11-24-2006, 01:13 PM
Hi DC,

I'm using dreamweaver 8 and I'm trying to get the background of a table cell to change as I rollover it. The cell has a text link in it too. If it was an image I could do the rollover easy, but because there is text in it im having trouble changing the background colour of the cell.

This site shows what I mean http://www.smartwebby.com/web_site_design/css_styles.asp check out the top menu drop downs

Hope that makes sense. Any ideas folks?

Thanks

Scan

davidj
11-24-2006, 01:57 PM
just set a CSS class and refer to it like this..

in your <td> add


<td onMouseOver="this.className='**class name here**'"


remember to add a onMouseOut="" and a Class="" to the <td> to set the colour initially

oh and welcome to the club Scan !

scan
12-05-2006, 05:06 PM
Thanks very much, got it sorted.