Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CSS to alter hyperlink color

Status
Not open for further replies.

jazzz

Technical User
Feb 17, 2000
433
US
I don't know if this is possible but can I use CSS to alter the color of hyperlinks on the header, Body and footer? Or once I set page properties is that it?

Life's a journey enjoy the ride...

jazzz
 
If you declare classes for them, you can give specific links a certain color.
Code:
HTML:
<a class="header" href="url.html">Blah</a>

CSS:
a.header { color: #000; }

Forgive me if my syntax is a little off.
 
search the forums for hyperlink color you'll find hundreds of threads!



Chris.

Indifference will be the downfall of mankind, but who cares?
 
To do exactly what you want and presuming you have elements by the name (id) header, body and footer in your document you can do it like this:
Code:
<style type="text/css">
#header a { color: red; }
#body a { color: #56ff03; }
#footer a { color: blue; }
</style>

<div id="header">
 <a href="[URL unfurl="true"]http://www.google.com">Red</a>[/URL]
</div>
<div id="body">
 <a href="[URL unfurl="true"]http://www.google.com">I[/URL] don't really know what color</a>
</div>
<div id="footer">
 <a href="[URL unfurl="true"]http://www.google.com">Blue</a>[/URL]
</div>
Hope it helps.
 
Thank you all for the guidance it truly is appreciated.

Life's a journey enjoy the ride...

jazzz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top