#1
  1. No Profile Picture
    I need more of everything
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    variable
    Posts
    182
    Rep Power
    13

    css hover and table cells


    I have seen many websites in the past that use css to change the entire table cell color as well as the text color on the link when it is hovered over. I really wnat to know how to do this with css. Does anyone know?

    Thanks in advance
    Windows?
  2. #2
  3. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2000
    Posts
    1,058
    Rep Power
    22
    That's the beauty of the web, it's all there for you to learn from (at least client-side stuff). Anytime you see a neat javascript or css trick all you have to do is hunt down the file(s) that contain the goodies.

    But, just to make your life simple, try this:

    Make a file called style.css. In it put the following:
    Code:
    a          {font-family: arial, helvetica, sans-serif;
                  font-size: 8pt;
                  text-decoration: none;
                  color: #000
    }
    
    a:hover{font-family: arial, helvetica, sans-serif;
                  font-size: 8pt;
                  text-decoration: none;
                  color: #f00;
                  background: #000;
    }
    
    td         {background-color: #00f;
    }
    Then add

    Code:
    <link rel="stylesheet" type="text/css" href="style.css">
    to the head section of your HTML page (make sure that style.css is in the same directory, or change the path to wherever you put it).

    Feel free to play around with the style definitions and see what happens. I have a small collection of .css files I've found and saved over the last year because they had good/interesting tricks in them, I suggest you do the same.


    wdn2k
  4. #3
  5. No Profile Picture
    I need more of everything
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    variable
    Posts
    182
    Rep Power
    13
    thanks very much
    Windows?

IMN logo majestic logo threadwatch logo seochat tools logo