Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member ihateyoualot's Avatar
    Join Date
    May 2004
    Posts
    15
    Member #
    6006
    Is there a way to change a table background image on rollover? What I'm looking to do is have an image inside a table and when you rollover the table to open the image or whatver the table not only changes color but the background image changes...

    I'm also not real sure how to go about changing table bgcolors on rollover...
    There's a good chance I don't hate you as much as my name would lead most to believe.

  2.  

  3. #2
    Senior Member Riat_Sila's Avatar
    Join Date
    Oct 2003
    Location
    Berkshire, UK
    Posts
    417
    Member #
    3485
    I wouldn't know if this actually works, as I've never tested it, but you could try:
    Code:
    #cellid a:link{
    background-image:url(firstimage.ext);
    }
    #cellid a:hover{
    background-image:url(secondimage.ext);
    }
    Where "#cellid" is the id of table/cell that you have named.

  4. #3
    Senior Member Fallout's Avatar
    Join Date
    Aug 2003
    Location
    Richmond, Virginia
    Posts
    543
    Member #
    2748
    That code will only change the backgrounds of any <a> tags. To do just the table cells use the following code, but it won't work in IE without using javascript because IE won't allow :hover classes for non <a> tags.

    Code:
    td:hover { backround: url(file.jpg); }
    /* OR */
    #cellid:hover { background: url(file.jpg); }

  5. #4
    Senior Member Riat_Sila's Avatar
    Join Date
    Oct 2003
    Location
    Berkshire, UK
    Posts
    417
    Member #
    3485
    I forgot to imply that you had to wrap your table in anchors for this to work

  6. #5
    Member
    Join Date
    Dec 2004
    Posts
    67
    Member #
    8452
    Liked
    1 times
    Quote Originally Posted by Fallout
    because IE won't allow

    lol, that's why you put a dhtml link to firefox
    Brian : This must be the physics department.
    Chris : That explains all the gravity.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:56 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com