PDA

View Full Version : CSS Remote Rollover Help


prophetofjah
09-14-2006, 05:53 PM
Howdy,
I am trying to change the background color of a cell on rollover with css.

This is the page: http://www.fathomseo.com/riversidesteel/demo/template.shtml

On the left had side is my navigation. I want to be able to rollover either the entire row or just the td of each link in the left nav and have the individual link's little box, on the left of each link, background color to change to white.

I did create a second class with the white background for the small box, thinking that I could code it to just switch styles on rollover. Not sure how to do this. I want to do it with CSS.

Thanks,
PoJ

prophetofjah
09-14-2006, 07:28 PM
Howdy,
I have figured out how to do the rollover here with javascript:

<tr>
<td width="12" class="sideNavLinkRolloverbox2" id="rolloverBox8">&nbsp;</td>
<td width="148" class="sideNavLink2" onMouseOver="document.all.rolloverBox8.style.backgroundColor='white'" onMouseOut="document.all.rolloverBox8.style.backgroundColor='#005B80'">Drainage Products</td>
</tr>

The only problem is I need a unique id for each link in my nav. Can someone please let me know how to accomplish the same thing but with CSS only?

Thanks,
PoJ

mark87
09-14-2006, 07:56 PM
Why not just do something like this? No messy Javascript, just CSS.

http://css.maxdesign.com.au/listamatic/vertical08.htm

Edit, actually after a closer look at what you want to do, this is a better example: http://css.maxdesign.com.au/listamatic/vertical09.htm . You can use a left border to create the white square you currently have.

prophetofjah
09-15-2006, 05:25 PM
thanks so much... that was what I was looking for