changing background color of <td> when hovering

B

Ben C

Hi all

I don't succeed to change the background color in a <td> when hovering
over it with the mouse.
In this example
http://www.bep-zuerich.ch/test_td_hover.htm
the cell color of 'external' and 'internal' should change (not only the
color under the letters).

Can anybody help me? Thanks. Max.

Your class names are "ext" and "int" in the HTML but "external" and
"internal" in the CSS.
 
M

max

Ben said:
Your class names are "ext" and "int" in the HTML but "external" and
"internal" in the CSS.

Thank you. I corrected it.
I should be able to change the cell background, too. But I don't
succeed.
Max.
 
J

Jukka K. Korpela

Scripsit max:
I don't succeed to change the background color in a <td> when hovering
over it with the mouse.
In this example
http://www.bep-zuerich.ch/test_td_hover.htm
the cell color of 'external' and 'internal' should change (not only
the color under the letters).

You aren't even trying to change the background of any cell (<td>), only the
background of some links (<a>) inside cells. Does this give a clue?

Setting
display: block; width: 100%; height: 100%;
for the links inside cells would probably do the trick you want.

But you shouldn't cell sizes in pixels. Do you really need to use a _table_
at all? You're not showing any real example, so this is just speculation.
 
M

max

Jukka said:
Scripsit max:


You aren't even trying to change the background of any cell (<td>), only the
background of some links (<a>) inside cells. Does this give a clue?

Setting
display: block; width: 100%; height: 100%;
for the links inside cells would probably do the trick you want.

But you shouldn't cell sizes in pixels. Do you really need to use a _table_
at all? You're not showing any real example, so this is just speculation.

thanks a lot. with your settings (display: block; width: 100% ...) it
worked.
about table: no, I don't need a table. I actually use <div>. your
settings work there, too.
but I have another problem there: the navigation with <div> workes well
now. I should, however, define links in the text in an other way than
links in the navigation. how can I do this? can I split the a:hover
into, say, a.normal:hover and a.navigation:hover? Here is my test file:
http://www.bep-zuerich.ch/test_div_hover.htm
and here is the website I really work with (test version):
http://www.bep-zuerich.ch/0_neu5.php
Thanks for any help. Max.
 
N

Nico Schuyt

dorayme said:
But that is unethical, it only makes it seem the cell is changing
color. <g>

I confess; no support of tr/td hover in IE6 :) I wonder if IE7 does.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top