SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    May 2002
    Location
    USA
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Another Stylesheet Question

    Hello again,

    Ok, I've built a menu using a stylesheet. My question is, is there a way for me to just make my menu stylesheet apply to only those links in my menu and not affect the rest of the links on the page?

    Like in my menu there is a blue border drawn around the links, but I would like other links to not be underlined unless the mouse is hovered over them. I hope you understand what I am asking.

    Thanks.

    JRF2k
    Man can learn nothing except by going from the known to the the unknown. -- Claude Bernard

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    assign a different class to your menu links.
    Code:
    <style>
      a.normal {whatever}
      a.normal:hover {whatever else}
      a.menu {something}
      a.menu:hover {something else}
    </style>
    <a class="normal" href="#">
    <a class="menu" href="#">
    HTH.
    Sketch
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Zealot
    Join Date
    May 2002
    Location
    USA
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Sketch. That's got it working. Appriciate it.

    JRF2k
    Man can learn nothing except by going from the known to the the unknown. -- Claude Bernard

  4. #4
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no problem.

    Sketch
    Aaron Brazell
    Technosailor



  5. #5
    SitePoint Zealot
    Join Date
    May 2002
    Location
    USA
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess I spoke too soon.

    This is what I have:

    body{ background-color: #FFFFFF;
    font-family : font-family : "Courier New", Courier, monospace;
    color: #617C8F;
    margin: 0px 0px 0px 0px;
    }


    A:link, A:visited, A:active { text-decoration: none;
    border-style: solid;
    border-width: 2px;
    border-color:#617C8F;
    height: 10px;
    width: 200px;
    text-align: center;
    margin: 1px;
    color:#000000;
    background: white;
    font-family: "Courier New", Courier, monospace;

    }

    A:hover{color:white;
    background:black;
    text-decoration:none;
    border-style: solid;
    border-width: 2px;
    border-color:#617C8F;
    height: 10px;
    width: 200px;
    text-align: center;
    margin: 1px;
    font-family: "Courier New", Courier, monospace;;
    }


    a.normal:visited, a.normal:active, a.normal:link {color: #617C8F;
    font-family: "Courier New", Courier, monospace;}
    a.normal:hover {color: #000000;}

    But now when I make a link it still has the border and background I had with the menu. When I remove those the link that is the text doesn't appear right. What am I doing wrong here? Thanks.
    Man can learn nothing except by going from the known to the the unknown. -- Claude Bernard

  6. #6
    SitePoint Zealot
    Join Date
    May 2002
    Location
    USA
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind. Figured out what I did wrong.

    JRF2k
    Man can learn nothing except by going from the known to the the unknown. -- Claude Bernard


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •