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

Visited Links 1

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
Being that Im still kind of new and never really used CSS (ok enough of the where have you been) never had a need. My pages are not pretty but very functional(Mostly to display data things like that). But now I need to know how. I have a page with different layers on it and different colors and I need to set the hyperlinks and any values set a certain way. I came across this in one of the posts by Wood (MIS)

A:LINK {
color: #336633;
}

A:VISITED {
color: #336633;
}

A:HOVER {
text-decoration: underline;
color: #336633;
font-weight : bold;
background-color: #CCFFCC;
}

No clue how to use it. Im sure its easy. AJ
I would lose my head if it wasn't attached. [roll1]
 
weather you put this in the page or in a .css all you do is paste it as it looks
the first sets the color for a link
the second sets the color of the link after visited
and the last is the color when the mouse sets focus on the link
if you want the values to be set for the entire site palce this in a .css and link to it, or you can jsut place it in the page with the style tags.
A:LINK {
color: #336633;
}

A:VISITED {
color: #336633;
}

A:HOVER {
text-decoration: underline; //underlines the link on hover
color: #336633;
font-weight : bold; //makes font bold on hover
background-color: #CCFFCC; //changes bgcolor on hover
} You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
as this code is the link and visited link are set to the same color. Kind of defeats the purpose but if you want to change it just change the hex in the visited. You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
How would I do it if I wanted a few links to be different colors than the others. AJ
I would lose my head if it wasn't attached. [roll1]
 
you can do it this way as well
<A Style.link=&quot;color: red&quot; Href=&quot;#&quot;>link</a> You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
Link1 will do what's set here:

A:LINK {
color: #336633;
}

Link2 will do what's set here:

.div12 A:LINK {
color: #336633;
}

then in the page:

<a href=&quot;#&quot;>I am link2</a>

<div class=&quot;div12&quot;>
<a href=&quot;#&quot;>I am link2</a>
</div>

all links outside of the div12 will look like link1 and all that are inside will look like link2.

Rick if(($question==&quot;has been bugging me&quot;
AND $answer==&quot;fixed the problem&quot;) OR $answer==&quot;really good post&quot;){
print(&quot;Star&quot;);
}else{
print(&quot;Thanks.&quot;);
}
 
Looks like Link1 and Link2 are keywords in these forums. hmm.

Rick if(($question==&quot;has been bugging me&quot;
AND $answer==&quot;fixed the problem&quot;) OR $answer==&quot;really good post&quot;){
print(&quot;Star&quot;);
}else{
print(&quot;Thanks.&quot;);
}
 
Thanks to you both.

onpnt:Im gonna have to start paying you for all help.

ristmo2001:for the easy explanation AJ
I would lose my head if it wasn't attached. [roll1]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top