Click to See Complete Forum and Search --> : [RESOLVED] Change cell bg colour on rollover?


PRINCESS_FUNK
11-14-2006, 04:46 PM
Hi there,

I am having trouble getting the text colour for my nav bar to change when active? i have just used the dreamweaver css functions to do this, as im not too experienced in css etc. is there any tricks here? or will this just not STAY the colour, but only turn that colour for the second you click on it?

One more thing, im viewing my page in iexplorer and im finding that when i click on a text link, a blue square around the text apears untill i click somewhere else on the page, is there anyway to get rid of this? it doesnt seem to be hapening in safari.

Hope you can help
Princess_Funk

WebJoel
11-14-2006, 05:34 PM
http://www.vladdy.net/demos/iepseudoclassesfix.html

JsAllan
11-16-2006, 10:20 AM
You can't do a rollover using CSS alone, you need to use JavaScript. Alternatively, you could use the onMouseOver and onMouseOut attributes for the cell. You'd have to have the background set in your stylesheet. Anyway, it would go something like this <td class="cell" onMouseOver="background:colour;" onMouseOut"background:colour2;">TEXT</td>

KDLA
11-16-2006, 10:23 AM
<td onMouseOver="this.style.backgroundColor='#00FFFF'" onMouseOut
="this.style.backgroundColor='#ff0000'">

JsAllan
11-16-2006, 10:26 AM
Yup, that'll certainly work too.

PRINCESS_FUNK
11-16-2006, 04:41 PM
HEY, THANKS FOR YOUR HELP. WORKED A TREAT :p