By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Hyperlink Colors Do Not Change

torquehero
P: 14
hi,
I am working with dreamweaver MX 2004. The problem is with Link colors (text). In page properties I have specified the link color, visited links, active links as #000000 and rollover links as #0066cc. Now I click on apply, OK and then I save the file. When I preview it in the browser (IE6), the links are gray..i.e, #666666. The text which does not contain a hyperlink accepts whichever color I set it to. But "the links" are really stubborn. They just dont want to let go that #666666.

Sometimes when I try to change the color, the font becomes bold and then I just cant undo it. Deleting the text is the only option that remains.

In the <head> section, it shows the right colors (the ones that I have set)

a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #0066CC;
}
a:active {
text-decoration: none;
color: #000000;
}

But in the browser it still shows gray. I also deleted all the temp files and cookies and forms, history.. etc etc...
I even deleted this whole stuff and did it once again rgt from the beginning.. bt in vain. Then I went to the edit style sheet option.. set the colors for that style sheet clicked on "Done".. applied that style to the links bt even then.. The issue persists.
I have tried it many times and I am really losing my patience now. :D
PLease somebody help mi... I would really appreciate your help.

Here's the Link http://web.kbl.co.in/kbl_internet/home_broad.asp


Thanx :D
Apr 21 '07 #1
Share this Question
Share on Google+
4 Replies


drhowarddrfine
Expert 5K+
P: 7,435
What you are doing is coloring the 'anchor' but not the text. Put the text inside a <span> and color that.
Apr 21 '07 #2

torquehero
P: 14
What you are doing is coloring the 'anchor' but not the text. Put the text inside a <span> and color that.
thanx.. bt shouldnt it work out if I have already set that attribute to all the text and links that are there on the page?

I dont kno how to work it out with <span>, since I have never used it manually. cn u please give me an example? I visited http://www.w3schools.com/tags/tag_span.asp but it wasnt of much use...
Apr 23 '07 #3

P: 2
thanx.. bt shouldnt it work out if I have already set that attribute to all the text and links that are there on the page?

I dont kno how to work it out with <span>, since I have never used it manually. cn u please give me an example? I visited http://www.w3schools.com/tags/tag_span.asp but it wasnt of much use...
its better if you use css/style rather than <span> tag, well here's an example, ive used your style's for links and it is working here...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #0066CC;
}
a:active {
text-decoration: none;
color: #000000;
}
</style>
</head>

<body>
<p><a href="#">Link 1
</a></p>
<p><a href="#">Link 2</a></p>
<p> <a href="#">Link 2</a></p>
<p> <span> <A href="#">Span Link </A></span>

</p>
</body>
</html>


Hope this will help you.. have a nice time codin...
Apr 23 '07 #4

torquehero
P: 14
its better if you use css/style rather than <span> tag, well here's an example, ive used your style's for links and it is working here...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #0066CC;
}
a:active {
text-decoration: none;
color: #000000;
}
</style>
</head>

<body>
<p><a href="#">Link 1
</a></p>
<p><a href="#">Link 2</a></p>
<p> <a href="#">Link 2</a></p>
<p> <span> <A href="#">Span Link </A></span>

</p>
</body>
</html>


Hope this will help you.. have a nice time codin...
Hey, thnx Athishay1... :D ya the code tht u sent is workin fine.. But not when I run it through my Server... It runs well when previewed on a local Computer, but when it is run thru a Server with a proper url,... it goofs up..

Last night I found out the problem.. I had included a footer.htm in this main .asp and it was the footer's text attributes that were affecting the main .asp's link colors. I still do not know why the footer.htm should affect the main asp file... Anyways...I set the footer file text attributes to what I wanted and VOILA !!!! Issue Resolved... thnx a lot for your time.. u too hv a nice time..

Regards

Torquehero
Apr 24 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.