Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jdl8422

macrumors 6502
Original poster
Jul 5, 2006
491
0
Louisiana
i have my site set up and I am using an external style sheet. I have attached a photo of what I want the text to look like, but when I at the links it changes it to the default blue color that I do not want. how do I set up multiple link styles or just have a stlye that leaves links like i already have them?
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    40.8 KB · Views: 57
You can style link behaviors with CSS pseudoclasses. For example:

Code:
a {
  color: #600;
  text-decoration: none;
}
a:hover {
  color: #fff;
  text-decoration: underline;
}

That will give you red, non-underlined links that turn white and become underlined when you hover over them. You can get more specific with a:link (default link state), a:visited (a link that the user has visited), and a:active (when a link is clicked on). Of course since all your links on your site are unlikely to behave the same way -- your navigation links might be different from inline links in posts -- you'll want to target your CSS.

Code:
#main_nav a {
  color: #600;
  text-decoration: none;
}

^ That targets only "a" tags inside an element with id="main_nav".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.