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
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
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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.