The Little Guy Posted July 9, 2012 Share Posted July 9, 2012 I have a table that looks like so: <table> <tr> <th>Header</th> <th>Header</th> <th>Header</th> </tr> <tr> <td>Item</td> <td>Item</td> <td>Item</td> </tr> </table> How can I apply a hover effect to a "tr" element ONLY if it has a "td" child element? Link to comment https://forums.phpfreaks.com/topic/265444-hover-with-children/ Share on other sites More sharing options...
Drongo_III Posted July 9, 2012 Share Posted July 9, 2012 You can't apply a style to tr tags as far as i know. Can you explain a bit more? Link to comment https://forums.phpfreaks.com/topic/265444-hover-with-children/#findComment-1360391 Share on other sites More sharing options...
The Little Guy Posted July 9, 2012 Author Share Posted July 9, 2012 this worked: tr:hover > td{background-color: #f1f1f1;} Link to comment https://forums.phpfreaks.com/topic/265444-hover-with-children/#findComment-1360398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.