Jump to content

tr: hover


golles

Recommended Posts

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

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  :P

 

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

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

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

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 :P

 

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.