...

View Full Version : code for "already clicked on hyperlinks"



cyborg360
01-10-2010, 05:58 AM
What is the code to set the color for the "already clicked on hyperlinks"

I have <body link="gray" ...

but when after the link has been used it turns purple.

Excavator
01-10-2010, 06:10 AM
Hello cyborg360,
The only links I can see are the ones in your footer. They are #808080 which is set by .style4.
Could not find any blue links... Checked in FF3.5, IE8 and IE7.

Where did you find this link="gray" anyway???

cyborg360
01-10-2010, 06:16 AM
Hello cyborg360,
The only links I can see are the ones in your footer. They are #808080 which is set by .style4.
Could not find any blue links... Checked in FF3.5, IE8 and IE7.

Where did you find this link="gray" anyway???

I just need something like afterlink="". not too sure where I got it, but it worked. Depreciated, right?

I just noticed this: <style>a:link {color: #FF0000}</style> .

cyborg360
01-10-2010, 06:38 AM
I took out the styles and the body tag but "privacy policy" is still purple... I don't get it!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>******** ********</title>

<script type="text/javascript">
function linkOver(link)
{
var image = link.getElementsByTagName("img")[0];
image.src = image.src.replace("H.png","H2.png");
}

function linkOut(link)
{
var image = link.getElementsByTagName("IMG")[0];
image.src = image.src.replace("H2.png","H.png");
}

</script>

</head>

<body style="width: 1195px; margin-left: auto; margin-right: auto;background-color: #000000">

<div style="margin-left:800px;width: 309px; height: 221px; position: relative; top: -1px; left: 17px">
<img height="516" src="images/MGE5DARK.png" style="height: 210px; width: 300px" width="729" /></div>

<div style="margin-left: 65px;width: 278px; height: 25px; position: relative; top: 0px; left: 0px">
<img height="22" src="images/empower.jpg" style="z-index: 1; left: 0px; top: 0px; position: absolute" width="275" /></div>
<div style="height: 317px; width: 1195px; position: relative; top: -1px; left: -1px">

<div style="margin-left: 970px;height: 170px; width: 174px; z-index: 1; left: 0px; top: 0px; position: absolute">
<img src="http://****************.com/images/spanelfinal.jpg" style="height: 175px; width: 175px" /></div>
<div style="margin-left: 585px;height: 170px; width: 174px; z-index: 1; left: 0px; top: 0px; position: absolute">
<img src="http://****************.com/images/flwr.jpg" style="height: 175px; width: 175px" /></div>
<div style="margin-left: 777px;height: 170px; width: 174px; z-index: 1; left: 0px; top: 0px; position: absolute">
<img src="http://****************.com/images/glet.jpg" style="height: 175px; width: 175px" /></div>
<div style="margin-left: 380px;margin-top: 0px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<img src="images/SIDE1H.png" height="20" width="185" /></div>
<div style="margin-left: 380px;margin-top: 31px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="leadership.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">

<img src="images/SIDE2H.png" height="20" width="185" style="border-width: 0px" /></a></div>
<div style="margin-left: 380px;margin-top: px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="vision.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/SIDE3H.png" height="20" width="185" style="border-width: 0px"/></a></div>
<div style="margin-left: 380px;margin-top: 62px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="development.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/SIDE4H.png" height="20" width="185" style="border-width: 0px" /></a></div>
<div style="margin-left: 380px;margin-top: 93px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="portfolio.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/SIDE5H.png" height="20" width="185" style="border-width: 0px" /></a></div>
<div style="margin-left: 380px;margin-top: 124px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="careers.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/SIDE6H.png" height="20" width="185" style="border-width: 0px" /></a></div>
<div style="margin-left: 380px;margin-top: 155px;height: 22px; width: 188px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="contact.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/SIDE7H.png" height="20" width="185" style="border-width: 0px" /></a></div>
<div style="position: absolute;width: 285px; margin-left:75px; top: 0px; left: -5px; bottom: 136px; right: 840px;">
<object data="http://****************.com/2.swf" type="application/x-shockwave-flash" style="width: 306px; height: 176px; z-index: 1; left: -19px; top: 0px; position: absolute;">
<param name="movie" value ="http://****************.com/2.swf" />
<param name="quality" value="High" />
<param name="bgcolor" value="#000000" />
</object>
<div style="margin-left: 515px;margin-top: 190px;height: 22px; width: 175px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="solutions.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/BOTTOM1VFRONTH.png" height="20" width="174" style="border-width: 0px" /></a></div>
<div style="margin-left: 705px;margin-top: 190px;height: 22px; width: 176px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="power.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/BOTTOM2VFRONTH.png" height="20" width="177" style="border-width: 0px" /></a></div>
<div style="margin-left: 900px; margin-top: 190px;height: 22px; width: 175px; z-index: 1; left: 0px; top: 0px; position: absolute">
<a href="training.html" onmouseover="linkOver(this);" onmouseout="linkOut(this); ">
<img src="images/BOTTOM3VFRONTH.png" height="20" width="174" style="border-width: 0px" /></a></div>
<div style="margin-left: 900px;margin-top: 290px;height: 82px; width: 562px; z-index: 1; left: -388px; top: -4px; position: absolute">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="style1">******** ********. All Rights Reserved.</span>

<a href="privacypolicy.html">Privacy Policy</a> |
<a href="termsofuse.html">Terms of
Use</a> | <a href="disclaimer.html">Disclaimer</a></p>
</div>

</div>
</body>

</html>

Arbitrator
01-10-2010, 06:40 AM
I just need something like afterlink="". not too sure where I got it, but it worked. Depreciated, right?The word is "deprecated".

The attribute you're looking for is the vlink (visited link) attribute. That attribute is deprecated though in favor of the CSS equivalent: the visited pseudo-class. Example:


a:link { color: blue; }
a:visited { color: purple; }

The link pseudo-class addresses unvisited links only whereas the visited pseudo-class addresses visited links only. If you want to style the element without targeting a specific state (i.e., you want all states to look the same), then you may as well not use a pseudo-class:


a { color: blue; }

Of course, you can still override that as necessary:


a { color: blue; }
a:visited { color: purple; }

(The above block of code equivalent to the first one in this post unless you're using a elements that aren't links (i.e., a elements that don't have href attributes). Since that's uncommon, they're virtually equivalent.)

Arbitrator
01-10-2010, 06:44 AM
I took out the styles and the body tag but "privacy policy" is still purple... I don't get it!The default style for visited links in most browsers is purple text. You need to explicitly override this if you want to change it for your users. (If you just want to change the default for yourself or override the styles specified by the Web page, you would change your browser's settings.)

cyborg360
01-10-2010, 06:49 AM
great, good to know.

mobotech
01-10-2010, 08:51 AM
great, good to know.

Hey Cyborg, curious.. where are you learning your html/css from?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum