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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Override CSS

Status
Not open for further replies.

linuxnewbi

Technical User
Joined
Oct 5, 2004
Messages
8
Location
CA
Can you override a link colour set by a CSS?
I just need to change the color of a link on one of my pages, and want to continue using the CSS.
 
Sure!

Just specify it as a new class, or use the stile attribute. For example:

Code:
...
<style type="text/css">
<!--
a {
  color: red;
  text-decoration: none;
}
a:visited {
  color: red;
  text-decoration: none;
}
a:hover {
  color: red;
}
-->
</style>
...
<a href="page.html">This link is red and has no underline!</a><br><br>
<a href="page2.html" [b]style="color: green;"[/b]>This link is green!</a>

Thus the name: Cascading Style Sheets.

--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top