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 2 of 2

Thread: hover over a td

  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    13
    Thanks
    5
    Thanked 0 Times in 0 Posts

    hover over a td

    Hi,

    I did post this question in the CodingForums HTML/CSS section, but didnt get any response, so posting this under JavaScript

    I have a specific requirement where in a table if someone hovers over a td,
    1) the background color should change to grey
    2) the text color in the td should change to white
    3) the text in another td should change to a different value

    Can we do this via normal css or this will need javascripting ? Any example code ?

    Thanks,
    Deepna

  • #2
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is how you do it with CSS: http://www.w3schools.com/cssref/sel_hover.asp. A nicer way would be to use animations to get a smoother experience.
    Last edited by WA; 10-31-2011 at 01:59 PM.


  •  

    Posting Permissions

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