wannabe_god Posted June 7, 2006 Share Posted June 7, 2006 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 More sharing options...
pulpfiction Posted June 7, 2006 Share Posted June 7, 2006 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 More sharing options...
wannabe_god Posted June 7, 2006 Author Share Posted June 7, 2006 THX!that was what i were looking for! Link to comment Share on other sites More sharing options...
boen_robot Posted June 7, 2006 Share Posted June 7, 2006 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 More sharing options...
reportingsjr Posted June 8, 2006 Share Posted June 8, 2006 FYI, link and vlink are deprecated (that means they arent web standard and probably wont be suported in some browsers soon). Link to comment Share on other sites More sharing options...
snowboard01 Posted June 8, 2006 Share Posted June 8, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now