Azu Posted March 30, 2007 Share Posted March 30, 2007 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 Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted March 30, 2007 Share Posted March 30, 2007 try this td a { display: block; width: 100%; height: 100%; backgorund: transparent; color: #f00; text-decoration: none; } td a:hover { backgorund: transparent; color: #069; text-decoration: underline; } Quote Link to comment Share on other sites More sharing options...
Azu Posted March 30, 2007 Author Share Posted March 30, 2007 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} Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted March 30, 2007 Share Posted March 30, 2007 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; } Quote Link to comment Share on other sites More sharing options...
Azu Posted March 30, 2007 Author Share Posted March 30, 2007 Yay it's working right now exactly how I was hoping thanks! And all without javascript.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.