how to change colour when hovering over a headline/link

  • Unknown's avatar

    Does anyone know how to change the colour of a article headline or link when hovering over it? My headlines and links are currently dark red but i would like them to change to blue when someone hovers over them with the cursor.

    I would also like them to underline when hovering over them too. Call me greedy:)

    Any ideas how to do this?

    http://www.ukmediapundit.com

    Tom

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar
    #content h2 a:hover {color: #03f; text-decoration: underline;}

    You’ll need to select a blue that you like, though… “#03f” is just a place holder.

    Also, the first selector in your CSS is wrong:

    content h2,#content a {
    color:#800000;
    }

    It’s missing the pound sign before “content”. It should read like this:

    #content h2,#content a {
    color:#800000;
    }
  • Unknown's avatar

    Thanks once again Devblog, that’s worked fine.

    Do you know how to apply the same rule to my links included within my content – i want them to underline when hovering over them too.

    Tom

  • Unknown's avatar

    No problem.

    Modify your selectors so they read like this:

    #content h2 a:hover {color: #03f;}
    
    #content h2 a:hover, #content a:hover {text-decoration: underline;}
  • The topic ‘how to change colour when hovering over a headline/link’ is closed to new replies.