help with link styles

hey all.<br />
<br />
On my page, I want to use different styles for links. There is a range of links along a red bar for navigation that I want to be in white, and then the links on the main body of the site (on a white background) need to be in black. How can I set it so that one part of the page uses one set of link styles whilst the other part uses another style? My only other idea is making a header page and including it using SSI, which I was going to do anyway. Seems a bit pointless posting this now, I've just solved the problem whilst writing it.. funny how things come to you at bad moments, eh?<!--content-->Just use style sheets. you can set different class names and then use these class names in the links.<br />
<br />
example:<br />
<br />
<style><br />
A.header:link {color: white; text-decoration: none;}<br />
A.header:visited { color: red; text-decoration: none;}<br />
A.header:hover { color: green; text-decoration: underline;}<br />
<br />
A.lnks:link {color: blue; text-decoration: none;}<br />
A.lnks:visited { color: yellow; text-decoration: none;}<br />
A.lnks:hover { color: green; text-decoration: underline;}<br />
</style><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"somelink.html" class="header"><br />
<a href=http://www.htmlforums.com/archive/index.php/"anotherlink.html" class="lnks"><!--content-->thanks.. I'd tried something like that but Dreamweaver confused it all.. damn thing. I'll keep you posted.. heh<!--content-->Hmm, don't forget to make that first tag: <style type="text/css"> instead, and surround the code with <-- comment --> tags to hide it from older browsers.<br />
<br />
The style tags and code MUST all go in the <head> section of the document, otherwise it will not work or could crash the browser.<!--content-->
 
Back
Top