|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
is this possible w/ CSS? changing color of a link inside cell when i mouseover cell
currently i have links defined as a certain color and changes to a certain color when i hover over them.. i have a table which has these links inside the cells and when i hover over the cell, the background of the cell changes color but the link wont change color until i hover over the link.. is there anyway so that when i hover over the cell i can make the link change color too?
the problem is i have some padding for the cells, so once i go inside the cell but dont hover exactly over the link, the background will change but the link won't until i hover over it thanks |
|
#2
|
||||
|
||||
|
You'll need javascript to do this. I'm pretty sure it's been mentioned a few times in the javascript forum, so try a search there. look for mouseover background color, or something like that. Hope this helps...
__________________
Proud member of the T.S.N.B.U.F.L (tables should not be used for layout) alliance. "Only use elements for their intended purpose. You wouldn't try to make coffee with a telephone, would you?" -Me |
|
#3
|
||||
|
||||
|
It would be nice to see a skeleton of what you have so far. Although I think that what you are asking for could be accomplished using psuedo-classes, but without seeing the whole example it's hard to say for sure,
here's a link to the w3c definition of selectors http://www.w3.org/TR/REC-CSS2/selec...ibute-selectors
__________________
The Standards! CSS 2 - CSS 3 - w3c CSS Validator - XHTML 1.1 - HTML 4.01 - w3c (X)HTML Validator - ActionScript Reference Links! Bert's Door and Lock Service | Brandon Erik Bertelsen | TextPattern |
|
#4
|
|||
|
|||
|
Code:
td:hover a {
color: red;
}
This does not work in IE. It should work in Mozilla, Opera, and Safari, I believe. Hope that helps! Happy coding! ![]() |
|
#5
|
|||
|
|||
|
Set the anchors in the table cells to be displayed as blocks and remove the padding on the table cells so that the anchor fills the whole cell. (set any padding you need on the anchor class)
Code:
td a {
display:block
}
You will need to look at the way your tables are styled but this does do what you want. Mick ![]() |
|
#6
|
||||
|
||||
|
Quote:
Wouldn't it be Code:
td a:hover {bleh}
? |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > is this possible w/ CSS? changing color of a link inside cell when i mouseover cell |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|