Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > changing background color of <td> when hovering

Reply
Thread Tools

changing background color of <td> when hovering

 
 
max
Guest
Posts: n/a
 
      11-06-2006
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.

 
Reply With Quote
 
 
 
 
Ben C
Guest
Posts: n/a
 
      11-06-2006
On 2006-11-06, max <> wrote:
> 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.
 
Reply With Quote
 
 
 
 
max
Guest
Posts: n/a
 
      11-06-2006

Ben C schrieb:

> On 2006-11-06, max <> wrote:
> > 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.


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

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-06-2006
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.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Nico Schuyt
Guest
Posts: n/a
 
      11-06-2006
max wrote:
> I don't succeed to change the background color in a <td> when hovering
> over it with the mouse.


Maybe something like:
http://www.nicoschuyt.nl/test/hover-table-cell-link.htm

--
Nico Schuyt
http://www.nicoschuyt.nl/


 
Reply With Quote
 
max
Guest
Posts: n/a
 
      11-06-2006

Jukka K. Korpela schrieb:

> 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.
>
> --
> Jukka K. Korpela ("Yucca")
> http://www.cs.tut.fi/~jkorpela/


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.

 
Reply With Quote
 
max
Guest
Posts: n/a
 
      11-06-2006

Nico Schuyt schrieb:

> max wrote:
> > I don't succeed to change the background color in a <td> when hovering
> > over it with the mouse.

>
> Maybe something like:
> http://www.nicoschuyt.nl/test/hover-table-cell-link.htm
>
> --
> Nico Schuyt
> http://www.nicoschuyt.nl/


Thanks a lot. your suggestion works perfectly. the problem with the
navigation is solved. but a new problem arose. please see my answer to
the message above. can you help again?
thanks, max.

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      11-07-2006
In article <454f1923$0$40063$>,
"Nico Schuyt" <> wrote:

> max wrote:
> > I don't succeed to change the background color in a <td> when hovering
> > over it with the mouse.

>
> Maybe something like:
> http://www.nicoschuyt.nl/test/hover-table-cell-link.htm


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

--
dorayme
 
Reply With Quote
 
Nico Schuyt
Guest
Posts: n/a
 
      11-08-2006
dorayme wrote:
> "Nico Schuyt" wrote:
>> max wrote:
>>> I don't succeed to change the background color in a <td> when
>>> hovering over it with the mouse.

>>
>> Maybe something like:
>> http://www.nicoschuyt.nl/test/hover-table-cell-link.htm

>
> 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.

--
Nico Schuyt
http://www.nicoschuyt.nl/



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
rounded corners in which my border color is different than the background color laredotornado@zipmail.com Javascript 1 02-14-2007 07:37 AM
DataGrid, changing background color of a Row? =?Utf-8?B?TmVpbA==?= ASP .Net 0 10-07-2004 04:11 PM
Problem with setting background color alternating item in datalist to a certain color fig000 ASP .Net Web Controls 0 09-06-2004 06:51 PM
changing a background image to a background colour? Dj Frenzy Javascript 3 02-10-2004 08:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57