WordPress.org

Ready to get started?Download WordPress

Forums

Need to set up 2 styles of links (4 posts)

  1. graham1881
    Member
    Posted 6 years ago #

    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>

  2. Alex Cragg
    Member
    Posted 6 years ago #

    it doesnt look like any of your links on your page have the class 'brown' so the css has nothing to style

  3. Sivar
    Member
    Posted 6 years ago #

    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 { ... }
  4. graham1881
    Member
    Posted 6 years ago #

    Thanks, Sivar! It worked!

Topic Closed

This topic has been closed to new replies.

About this Topic