SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way, using CSS, to change the background color of a cell within a table when the mouse moves over it (similarly to the way a link can change using the "hover" property)?

    Seems to me I've seen that technique used somewhere, but I just can't find it...

    Randy Rasa
    http://www.cleversoul.com/

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It can be found at http://www.dynamicdrive.com - I think it uses JavaScript as well.

  3. #3
    SitePoint Member
    Join Date
    Sep 2000
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td onMouseOver="this.style.backgroundColor='#FFCCCC'" onMouseOut="this.style.backgroundColor='#FFFFFF'" onClick="location.href='your page'">Test</td>
    </tr>
    </table>

    Try this, did not check too far on what browsers it works on but fine in IE 5.

  4. #4
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i didn't try it, but from my experience, i'd guess, that it don't work in ns < 6, since it has a different understanding of DOM and therefor doesn't understand the "this" here.
    felix geiger, felix.geiger@gmx.ch
    icq# 21156665
    moderator of worldrule.com javascript forum
    creator of sce


Bookmarks

Posting Permissions

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