Modifying the properties of only certain links

Discussion in 'HTML & Website Design' started by outspan, Apr 28, 2012.

  1. #1
    Hi all,

    I have a blog here: http://wysinnwyg.com/blog/

    and I want to modify the properties of only the links within the blog posts. How do I do that?

    The change I want is from this:

    a:hover, a:active { 
      color: #3B3B3B; 
    }
    Code (markup):
    to

    a:hover, a:active { 
     background-color: blue;
     color: white;
    }
    Code (markup):
    but if I do that, ALL the links in the blog are affected.

    I guess the solution is to create a class and use that class for the blog links? Would I then need to specify the right class for EACH link that I put in my posts? Could you help me with this, I haven't used HTML in years.

    thanks
     
    Solved! View solution.
    outspan, Apr 28, 2012 IP
  2. heloraghu

    heloraghu Member

    Messages:
    133
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #2
    by using back slashes we can modify certain areas of links
     
    heloraghu, Apr 29, 2012 IP
  3. #3
    You can add a class for each <a> you want to change but you could, if the links you want to change are inside a specific container (div) and you want to change only the links inside that container you can do :

    if the container is called #top

    #top a:hover, #top a:active { background-color: blue; color: white; }

    and it would change the links inside the #top div or what ever div you choose.
     
    MarkTheUser, Apr 29, 2012 IP