Jump to content

different link colors


wannabe_god

Recommended Posts

HeyI use 4 styles on my site, and in 1 of them, I want to have white links, and in another red links.Changing the link color is easy in html, head tag, link="color" vlink etc., but if I do that, the link colors are the same for the whole page.Someone who knows how to fix that?

Link to comment
Share on other sites

You want to have different colors for each link??? try this....<HTML><HEAD><title>Testing</title><style>a#link1{color:white}a#link2{color:red;}a#link1:hover{color:orange;text-decoration:none;}</style></HEAD><body bgcolor=Black><a href="#" id="link1">White Link </a><a href="#" id="link2">Red Link</a></body></HTML>

Link to comment
Share on other sites

Note that IDs are supposed to be used for only once per page. For using a style more then one time, you should use classes instead like this:<HTML><HEAD><title>Testing</title><style>a.link1{color:white}a.link2{color:red;}a.link1:hover{color:orange;text-decoration:none;}</style></HEAD><body bgcolor=Black><a href="#" class="link1">White Link </a><a href="#" class="link2">Red Link</a></body></HTML>You can also use both IDs and classes, where IDs have greather priority over classes.

Link to comment
Share on other sites

FYI, link and vlink are deprecated wink.gif (that means they arent web standard and probably wont be suported in some browsers soon).
You know as well as I do if the good browsers stop supporting depracted stuff almost no page will diplay right in them and every single person will pull out ie again. I don't think they r going anywhere at least not in firefox.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...