golles Posted February 19, 2009 Share Posted February 19, 2009 Hee, I made a nice php script that loads some tables from an other website. now I'm having trouble with the tr: hover. in the rows are 3 td's with a class (tbl) and they don't hover with the row Piece of the css td.tbl { border-right-width: 1px; background-color: #f7f7f7; } .standen tr:hover { background-color: #FFFF00; } here is the table Hope someone can help me out! Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/ Share on other sites More sharing options...
jcombs_31 Posted February 19, 2009 Share Posted February 19, 2009 The tr hover is working, but you are defining the td to a different color, so to me it appears to function as it should unless I'm missing something. Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-766427 Share on other sites More sharing options...
haku Posted February 20, 2009 Share Posted February 20, 2009 That's exactly what it is. You will have to take the color setting off the tds that aren't working. Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-766876 Share on other sites More sharing options...
golles Posted February 20, 2009 Author Share Posted February 20, 2009 I was allready thinking something like that... But there should be a way (CSS) to do this (also hover the td's with a bg color)? Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-766943 Share on other sites More sharing options...
haku Posted February 20, 2009 Share Posted February 20, 2009 You are using a CSS method already. But TD coloring will overpower TR coloring. It's the CSS way. Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-766948 Share on other sites More sharing options...
golles Posted February 20, 2009 Author Share Posted February 20, 2009 You are using a CSS method already. But TD coloring will overpower TR coloring. It's the CSS way. okee, thank you all Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-767290 Share on other sites More sharing options...
Goafer Posted February 23, 2009 Share Posted February 23, 2009 1 more thing, isn't it browser specific? IE doesn't render pseudo class' properly as far as I recall? which means that tr:hover won't work in IE (unless it's 7.0 or above?????) Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-769517 Share on other sites More sharing options...
jackpf Posted February 23, 2009 Share Posted February 23, 2009 1 more thing, isn't it browser specific? IE doesn't render pseudo class' properly as far as I recall? which means that tr:hover won't work in IE (unless it's 7.0 or above?????) Just checked it in IE6- doesnt work at all You could use javascript to accomplish the same effects. Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-769522 Share on other sites More sharing options...
jcombs_31 Posted February 23, 2009 Share Posted February 23, 2009 1 more thing, isn't it browser specific? IE doesn't render pseudo class' properly as far as I recall? which means that tr:hover won't work in IE (unless it's 7.0 or above?????) That is correct but I don't think it is really a big deal. IE6 users will just lose out on a little highlighting. As stated, you can fix this with javascript but I personally wouldn't bother. Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-769604 Share on other sites More sharing options...
TheFilmGod Posted February 23, 2009 Share Posted February 23, 2009 In CSS 2.1, the td.tbl will take precedence over any tr:hover effect. TD's literally overlay over TR's. One method is to delete the background-color declaration in td.tbl entirely. Method number two is a bit more advanced. Nonetheless it is compatible across all modern browsers. I don't consider IE6 modern (IE7+). .standen tr:hover td.tbl { background-color: #FFFF00; } Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-769611 Share on other sites More sharing options...
golles Posted February 24, 2009 Author Share Posted February 24, 2009 In CSS 2.1, the td.tbl will take precedence over any tr:hover effect. TD's literally overlay over TR's. One method is to delete the background-color declaration in td.tbl entirely. Method number two is a bit more advanced. Nonetheless it is compatible across all modern browsers. I don't consider IE6 modern (IE7+). .standen tr:hover td.tbl { background-color: #FFFF00; } I knew it should be posible! you're my hero now I came with the idea to do a crosshair hover. I'll post in the javascript forums for someone who is interested Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-770051 Share on other sites More sharing options...
TheFilmGod Posted February 24, 2009 Share Posted February 24, 2009 I'm glad it worked. Link to comment https://forums.phpfreaks.com/topic/145933-tr-hover/#findComment-770554 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.