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 7 of 7
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    83
    Thanks
    8
    Thanked 0 Times in 0 Posts

    :hover for a table row?

    Okay, so I'm trying to add a <tr> (row) rollover for my table on a database search. I've tried adding a .className:hover { background: #color; } and then applying that class to the tr element, but that didn't seem to work.

    Any suggestions/helpful code snippets?

    Thanks in advance,
    NeoMoon

  • #2
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    tr.classname:hover{background-color: #color}

    I don't know if this works in IE, though.

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Can we have a link?

  • #4
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    I think that will only work in FF, have you tested in both FF and IE?

  • #5
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You may need to use the whatever:hover file or try to download some javascript file from somewhere like Hotscripts.com in order to get this to work in IE.

  • #6
    New Coder
    Join Date
    Aug 2007
    Posts
    83
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by CyanLight View Post
    Can we have a link?
    http://neo-moon.com/ItemLookup.php

    And thanks for the responses guys.. I'm going to test those out real quick. ;-)

  • #7
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    :hover on rows does not work in IE6. :hover only works on anchors in fact for IE6, and I think its support is still a little bit spotty in IE7.

    Really I think without doing some very creative (and rather annoying) markup tricks, Javascript is really the simplist way to solve this conundrum.

    Here is an example of a js script designed to enhance IEs ability to handle things like :hover.

    http://code.google.com/p/ie7-js/
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

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