hover link assistance

Discussion in 'Software' started by Keyser Soze, Feb 24, 2009.

  1. Keyser Soze

    Keyser Soze Corporal

    i dont want to do a full css, i just want to make one page have it on mouse-over a link change color

    what would be the code for that?

    thanks
     
  2. Bwargh

    Bwargh Private E-2

    There are a couple ways to go about it. You could just embed the CSS into head of one page, versus the whole site. So between the <head> and </head> tags of your page, put something like...

    Code:
    <style type="text/css">
         a:hover{
         color: #ff0000;
         }
    </style>
    The hex is set to red, but you can make it whatever color. This will change the behavior of all the links on the page. If you just want it to be one link, you could specify an id. So between the <head> and </head> tags put something like...


    Code:
    <style type="text/css">
         a:hover#redlink{
         color: #ff0000;
         }
    </style>
    I called it "redlink" but you can name it whatever you want. And then when you make your link, you tell it to reference the style as whatever you named it before.

    Code:
    <a id="redlink" href="http://example.com">This link hovers red!</a>
    Tada!

    Hope this has been helpful.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds