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

link color attributes in tables

Status
Not open for further replies.

IronKitten

Technical User
Aug 9, 2001
28
US
okay.....here goes.....i have two tables. the body tag that governs the entire page is fine. I have another table with a dark background that i need a lighter link for. When i change the new <table> or <tr> or <td> attributes to the new color within that table only , it will not change.... I want to change the link colors for the entire table with a dark background. What am i doing wrong...... HELP!

P.S. When i change the body tag....it changes the whole page just fine...but i can't use yellow links on a white page.
 
I haven't learned how do that yet.....besides....even if i code it i still have to have it right to put in the .css file right???
 
Put the following code in a text file and save it as style.css (Adjust the colours to suit)


.link_1 {COLOR: #336699; TEXT-DECORATION: none; font-family: verdana; font-size: 11pt; font-weight: bold;}
a:link.link_1 {color : #336699; text-decoration: underline;}
a:visited.link_1 {color : #336699; text-decoration: underline;}
a:active.link_1 {text-decoration: none;}
a:hover.link_1 {color : #FFFFFF; text-decoration: underline overline;}

.link_2 {COLOR: #336699; TEXT-DECORATION: none; font-family: verdana; font-size: 11pt; font-weight: bold;}
a:link.link_2 {color : #336699; text-decoration: underline;}
a:visited.link_2 {color : #336699; text-decoration: underline;}
a:active.link_2 {text-decoration: none;}
a:hover.link_2 {color : #FFFFFF; text-decoration: underline overline;}

In the head section of the html page put the following code:

<link rel=&quot;StyleSheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot;>

Change your links to:

<A HREF=&quot;whatever.html&quot; style=&quot;link_1&quot;>

<A HREF=&quot;whatever.html&quot; style=&quot;link_2&quot;>

Wullie

 
thanks Wullie.....the power of CSS is soooo nice...change the head code on every page.....now this is all a breeze....that was easier than changing the teensie tiny spots in like some three hundred pages!!! wow......now i have GOT to learn CSS....where's a good place to start??
thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top