Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   CSS (https://www.askmehelpdesk.com/forumdisplay.php?f=445)
-   -   Mouse over on navigation (https://www.askmehelpdesk.com/showthread.php?t=156837)

  • Nov 28, 2007, 07:21 AM
    IMK17
    Mouse over on navigation
    On the left hand navigation bar of my web site, I have a white background, with all my links displaying with a blue font. Currently when I hover my mouse over the link, the text disappears.

    I would like to create the effect of when I hover my mouse over a link, the background colour goes purple, and the text goes to a white font.

    Thanks,
  • Dec 4, 2007, 08:51 AM
    jstrike
    This will do it for all links on the page:
    Code:

    <style>
    a:hover {background-color:purple; color:white;}
    </style>

    If you only want this to happen to certain links then:
    Code:

    <style>
    a.purpleHover:hover  {background-color:purple; color:white;}
    </style>
    <body>
    <a class="purpleHover" href="#">Hover here</a>
    <br>
    <a href="#">Normal Link</a>
    </body>

    HTH,
    -Jeff

  • All times are GMT -7. The time now is 09:58 PM.