-
1. Re: Adding multiple color links to a page
Nancy O. May 26, 2010 1:10 PM (in response to BearHNC)You need to define a set of link states (link, visted, hover, active) for each ID or class name required.
Let's say you want to have red links in your #header and white links in your #footer.
CSS:
#header a {text-decoration:none}
#header a:link {color:red} /**unvisited**/
#header a:visited {color:gray} /**visited**/
#header a:hover, /**on mouse over**/
#header a:active, /**on click**/
#header a:focus {text-decoration:underline}
#footer a {text-decoration:none}
#footer a:link {color:white}
#footer a:visited {color:yellow}
#footer a:hover,
#footer a:active,
#footer a:focus {text-decoration:underline}
HTML:
<div id="header">
<a href="some-link.html">Link in the header</a> |
<a href="some-link.html">Link in the header</a> |
<a href="some-link.html">Link in the header</a> |
</div>
<div id="footer">
<a href="some-link.html">Footer link</a> |
<a href="some-link.html">Footer link</a> |
<a href="some-link.html">Footer link</a> |
</div>
For more on CSS pseudo classes:
http://www.w3schools.com/css/css_pseudo_classes.asp
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
2. Re: Adding multiple color links to a page
BearHNC May 26, 2010 1:16 PM (in response to Nancy O.)Thank you



