Change Colour of Table Cell

Posted on 2004-11-02
Last Modified: 2010-04-06
I have a table on my website i would like it so when you hover over a cell in the table for it to change colour of the cell you or hovering over.

On certain cells should change colour, and change even if you are hovering over text in the cell.

thanx in advance
Question by:mad_psyso
    LVL 13

    Accepted Solution

    Add this to the relavent <td> tag:
     onmouseover="'green'" onmouseout="'transparent'"

    and replace green with the color (a word or a hexadecimal) you want.

    Author Comment

    Can you give the example using this

    <td  align="center" style="filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='silver', endColorStr='white', gradientType='0')"><font size="1" face="Arial, Helvetica, sans-serif">Products      &nbsp;</font></td>

    I would like the colour to stay as Silver fading to White when you hover over the mouse i would like it to change to White fading to silver

    LVL 13

    Expert Comment

    I don't know how to do that, sorry. I don't use microsoft proprietory code that works with nothing but IE.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Best way to find duplicate message in database 7 23
    Problem with http basic authentication 5 77
    css help 3 79
    Forbidden errors 5 95
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now