English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

if you see this website ( http://www.ask.com ) at the right side of it there is table in which if the mouse goes on any row of this table the background of this row changes color. how to make this effect?

I know how to use this effect for the text (where on mouse over, the color of that text changes)
I know this effect for image (where on mouse over, the image changes)

But i dont know how to change the color of background of a row of a table!

2006-07-30 04:45:34 · 4 answers · asked by QuestionAnswer 2 in Computers & Internet Programming & Design

4 answers

you should do this in css, but it might not work well in all browsers (same issue with JS though).


  • text 1

  • text 2




for IE you have to make it a bit uglier
add an onmouseover="this.class= 'liHovered';" onmouseout= "this.class=' '; " to each list item and add ,li.liHovered to the #changeColor li:hover line.

2006-07-30 05:40:38 · answer #1 · answered by John J 6 · 1 1

Look up "CSS Rollovers" on google or a tutorial site. I'm assuming that you know a little bit about html....

Basically make an unordered list and set the background color of each

  • within the list as a different color as the background for the over state. (in the css part of the page)

    2006-07-30 04:48:15 · answer #2 · answered by Anonymous · 0 0

  • If you're using Internet Explorer, click "View" and then "Source" and you can see exactly how they're doing it. Looks like a combination of DHTML and JavaScript to me.

    2006-07-30 04:53:22 · answer #3 · answered by mommadillo 4 · 0 0

    It's either javascript or CSS- it could be either. Check out www.webmonkey.com for some good tutorials.

    2006-07-30 04:50:13 · answer #4 · answered by Jonathan H 2 · 0 0

    fedest.com, questions and answers