#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0

    Css: changing the bg color


    i want to change the bgcolor of my menu table when i go over a link. when i go out, the bg changes back to it old selves. i want to use css and NO(!!!) javascript to solve this problem
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    Inside the GNU/Hurd kernel
    Posts
    492
    Rep Power
    12
    If you give the tables that you are going to use as menu the class "menu",then you could use something like this:
    .menu {background-color:white}
    .menu:hover {background-color:Highlight}
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    IE doesn't support that method, so if you want to have that effect then you can use javascript.

    Code:
    <style>
    .menuout { background-color: blue }
    .menuover { background-color: red }
    </style>
    </head>
    
    <body>
    <table width="90%" border="0" cellspacing="0" cellpadding="2">
      <tr> 
        <td class="menu">&nbsp;</td>
      </tr>
      <tr>
        <td class="menuout" onmouseover="this.className='menuover'" onmouseout="this.className='menuout'">&nbsp;</td>
      </tr>
    </table>
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0
    thx

IMN logo majestic logo threadwatch logo seochat tools logo