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

    Join Date
    Oct 2003
    Posts
    17
    Rep Power
    0

    CSS - multiple styles on one page


    I'm a newbie trying to create two link styles on one page. Can't get it done.

    Example: I want link one to be white text on black background with RED hover and no underline.

    I want link two to be BLACK text on white background with NAVY hover with underline.

    I've experimented tell I'm blue and can't get this accomplished.

    Any help is MUCH appreciated.

    Thanks!
  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.one:link, a.one:visited, a.one:active
      {
      text-decoration: none;
      color: white;
      background-color: black;
      }
    a.one:hover
      {
      text-decoration: underline;
      color: red;
      background-color: black;
      }
    
    a.two:link, a.two:visited, a.two:active
      {
      text-decoration: none;
      color: black;
      background-color: white;
      }
    a.two:hover
      {
      text-decoration: underline;
      color: navy;
      background-color: white;
      }
    Code:
    <a class="one" href="foo.html">Foo</a><br />
    <a class="two" href="bar.html">Bar</a>
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    17
    Rep Power
    0
    Thank you!

IMN logo majestic logo threadwatch logo seochat tools logo