css? or javascript? any know...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

css? or javascript? any know...

Post by m3mn0n »

Maybe you have seen it before on a site, when someone hovers the curser over the table row it changes color.

Is this a Cascading style sheet or javascipt?

I doubt it's java but i am not sure if it's possible so i didn't count it out.


If you need an example check out the menu on this site:

http://www.oxyscripts.com
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

they use a simple
onmouseout="this.style.background='eeefee'" onmouseover="this.style.background='FFFFFF'"
for those elements that can hover while I like to define one css-class for normal and one for highlite properties and assign them in a function called by onMouseOver/Out.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

thanks alot!
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

To make it so that if mouseout happens the background color go orinal color. Just do this

Code: Select all

onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFFFFF'"
Post Reply