Support » Themes and Templates » changing colour of only certain links

  • smith0281

    (@smith0281)


    Hi, wondering if anyone can help me…

    im new to wordpress and struggling with something thats probably quite simple 🙁

    ive inserted the code
    a:hover {
    color: #fff ;
    background-color: #000 ;
    }

    in my style sheet which has successfully changed the background colour of my links. However i only want that instance to apply to the links in my links catagory. Is there a way i can do this?

    http://www.beyourownvalentine.co.uk/blog

    thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • t31os

    (@t31os)

    What do you mean in your links category?

    Perhaps you mean the links under LINKS on the right-hand side.

    .xoxo a, .xoxo a:link, .xoxo a:visited { color:black; }
    .xoxo a:active { color:red; }
    .xoxo a:hover { color:green; }

    or

    .blogroll a, .blogroll a:link, .blogroll a:visited { color:black; }
    .blogroll a:active { color:red; }
    .blogroll a:hover { color:green; }

    Either should work, color was purely for example…

    smith0281

    (@smith0281)

    hi this is perfect and does isolate it so its only the links in the right hand side. Thanks so much!
    one more thing…how would i adapt it to the scheme i had which was white text with a black background on hover?

    🙂

    t31os

    (@t31os)

    color:black

    Was only an example…

    What goes between..
    { and }

    is up to you…

    http://www.w3schools.com/css/

    .blogroll a:hover { background:#000;color:#fff }

    You could also change background of the list element on hover like so..

    EXAMPLE:
    .blogroll li:hover { background:#ccc; }
    .blogroll li:hover a { color:#fff; }

    That will change the list element background and link color on hover… try it and see…

    smith0281

    (@smith0281)

    Just did it and it worked!!! thanks so much for your help…your a star!

    🙂

    t31os

    (@t31os)

    You’re welcome…. 😉

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘changing colour of only certain links’ is closed to new replies.