Jump to content

[SOLVED] Changing link color on <td> mouseover


Azu

Recommended Posts

Right now I use CSS to change the color of links, and the color of them when you mouseover them, and the color of text when you mouse over a <td> that they are in.

 

The problem is, it doesn't change the color of links when you mouseover the <td> that they are in.

 

I've even tried nesting an a:link{color:} inside of the td:hover{} but that didn't work either.

 

Please help :D

Link to comment
Share on other sites

Thanks, I'm really confused though!

I just want it so that mousing over the <td> will change the color of the links also, instead of only changing plain text like it does now...

 

Here is the code I'm using right now

td:hover{background-color:#66ffff;color:black}

Link to comment
Share on other sites

yes but older versions of ie only support :hover on the a tag so if the cell only has teh link in and nothing else set the link to be as high and wide as the table cell then use hover on the link.

 

if you are talking about a cell with text in and a tags in amongst the text then ie6 and below will not do what you want without javascript (I personally would not worry - it seems ie7 uptake is pretty good) so in that case do this

 

td

{

background: transparent;

color: #333;

}

 

td:hover

{

background: #ffc;

color: #069;

}

 

td:hover a

{

background: transparent;

color: #f00;

}

 

td:hover a:hover

{

background: transparent;

color: #999;

}

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.