Forum Moderators: not2easy

Message Too Old, No Replies

Help with CSS "cell" color change

Color of cell+font changes on mouseover

         

casey133

7:14 am on Jan 25, 2007 (gmt 0)

10+ Year Member



Does anyone know the exact code for creating a set of divs (I'm guessing) that change both the BG as well as the font color when you mouse over them?

I won't post the link for fear of deletion but if you type in "Project Seven" in Google (1st result) then click "Menu builders" on the right and scroll down you will the pricing for their "Menu-Building Systems". This is exactly the effect I want. I tried looking at the source to get an idea of how they do it but no luck. I hope someone else smarter than myself can show me.

Thanks.

dwighty

9:25 am on Jan 25, 2007 (gmt 0)

10+ Year Member



Hi casey133,

Looks like its done with CSS styling only.

You have have a hover pseudo-class.

So

<tr class="bg_color_change"></tr>

CSS File:
tr.bg_color_change { background-color: blue; }
tr.bg_color_change:hover { background-color: red; }

Hope that helps.

dwighty

9:25 am on Jan 25, 2007 (gmt 0)

10+ Year Member



By the way, this option doesnt work in IE6 or below!

mep00

2:54 pm on Jan 25, 2007 (gmt 0)

10+ Year Member



Looks like its done with CSS styling only.

Unless you were looking at different menus than I was, he was definitely using JavaScript, and a lot of it.

Do a Google search for "CSS menus" and you'll have plenty of choices. "Son of Suckerfish" is worth a look.