Thread: Css

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    74
    Rep Power
    11

    Css


    Can i specify two different styles for a link?

    I have one set as a link with colour grey, but when a link is against a grey background, it cannot be seen, so can i define two link colours in my CSS stylesheet?

    If so, how?
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Code:
    a:link
      {
      color: grey;
      }
    .foo a:link
      {
      color: red;
      }
    Code:
    <p>The link <a href="#">here</a> should be grey.</p>
    <p class="foo">The link <a href="#">here</a> should be red.</p>
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.

IMN logo majestic logo threadwatch logo seochat tools logo