WordPress.org

Support

Support » How-To and Troubleshooting » Need to set up 2 styles of links

Need to set up 2 styles of links

  • I have been reading and trying to solve for several days now. I need to set up two complete styles of links. I have found a solution but I am haveing trouble making it work. Here is my url: accoladespublicrelations.com Here is the style sheet code:

    a {
    text-decoration : none;
    color : #EABE1F;
    background : inherit;
    }
    a:hover {
    text-decoration : underline;
    color : #5AB8DC;
    background : inherit;
    }
    a img {
    border : 0;
    }

    a.brown {
    text-decoration : none;
    color : #9C1A22;
    background : inherit;
    }
    a.brown:hover {
    text-decoration : bold;
    color : #555555;
    background : inherit;
    }
    a.brown img {
    border : 0;
    }

    Here is the template page code:

    <h6>

    ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?>

    </h6>

Viewing 3 replies - 1 through 3 (of 3 total)
  • it doesnt look like any of your links on your page have the class ‘brown’ so the css has nothing to style

    The hover wouldn’t work in either case, because it’s not correct to define some .class:pseudoclass (at least, it didn’t work for me). What you might try instead, is to give a class to a wrapping element of the "a". If it’s a headline, it could be like this:

    <h2 class="brown"><a [...]> ... </a></h2>

    and then in your css:

    .brown a { ... }
    .brown a:hover { ... }
    .brown a img { ... }

    Thanks, Sivar! It worked!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need to set up 2 styles of links’ is closed to new replies.