Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts

    CSS bg rollover for entire <tr>?

    I am using this script to make the entire <td> a link, and to rollover the background. However, i want this to happen to every <td> in a <tr> when you put your mouse over one of them. Heres the script:

    PHP Code:
    <style type="text/css">
    <!--
    .
    link {
         
    display:block;
         
    width:100%;
         
    height:100%;
         
    text-decoration:none;
         
    color:#000000;
     
    }
    .
    link:hover {
         
    background:#B9B9B9;
         
    display:block;
         
    width:100%;
         
    height:100%;
         
    text-decoration:none;
         
    color:#000000;
    }
    -->
    </
    style
    I am putting the class 'link' in an <a> inside each <td>

    How can i make it rollover every <td> in the <tr> without JS?
    If I'm postin here, I NEED YOUR HELP!!

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    td:hover { properties }

    But you still need js to get it to work in IE. That's about as much as I can guess without seeing the page or the HTML...
    Last edited by rmedek; 03-03-2005 at 09:52 PM.

  • #3
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, IE doesn't handle the hover attribute for anything other than an a tag -- you could make the element inside the td an a tag, with whatever else in it, to force the feature.
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •