How to with CSS - Question about Cascading Style Sheets (Posted by Nico)
Hello!! I am adding css to my webpage, but I want to know how to add the style sheets just for some links not for all of them. I am adding this code at the moment
<style type="text/css"><!--
a:hover { color: #000080; font-weight: none; text-decoration: underline }
a:link { color: #4169e1; text-decoration: none }
a:visited { color: blue; text-decoration: none }-->
</style>
Thanks!!
----------
Nicolas Escobar J.
http://www.developy.com - Haven't developed your site yet??
Nicolas Escobar J.
http://www.developy.com
Free resources for webmasters in spanish
Anonymous posted this at 22:25 — 29th October 1999.
They have: 5,633 posts
Joined: Jan 1970
You have to give them classes:
<style type="text/css"><!--
--- FIRST LINK DEFINITION ---
a.link:hover { color: #000080; font-weight: none; text-decoration: underline }
a.link:link { color: #4169e1; text-decoration: none }
a.link:visited { color: blue; text-decoration: none }-->
--- SECOND LINK DEFINITION ---
a.anotherlink:hover { color: #000080; font-weight: none; text-decoration: underline }
a.anotherlink:link { color: #4169e1; text-decoration: none }
a.anotherlink:visited { color: blue; text-decoration: none }--
</style>
And then refer to them in the body as:
<a href="whatever.html" class="link">something</a>
Make sense?
You can check out our site (http://www.dids.com) and view the source... We use this method.
----------
Dynamic Internet Solutions : http://www.dids.com
UNIX and Windows NT Hosting
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.