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? Quote Link to comment 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? Quote Link to comment 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;} 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.