Go Premium for a chance to win a PS4. Enter to Win


IE7 Visited links CSS

Posted on 2008-06-11
Medium Priority
Last Modified: 2013-12-08

The css tags a:visited{color: #2a2a2a} used to work fine in IE6 but it seems to be broken in IE7.

How do I modify my CSS to make the browser remember visited links and show them in different color?

I have tried: a:link:visited, a:visited:link {color: #666666}, but it doesnt work as it supposed to.

Question by:niftyhawk
  • 2
LVL 65

Expert Comment

ID: 21760687
a:visited{color: #2a2a2a} should work fine with IE7 too
just make sure that the styles are in order of


and there are no other styles which are over-riding or clashing with the a:visited one like a:link:visited or a:visited:link

Accepted Solution

cool_sathish_333 earned 2000 total points
ID: 21760705
Hello niftyhawk,
Just make a try of this one

replace >> a:visited{color: #2a2a2a} << 
>> a:visited {color: FFAD73;  font-family: arial, helvetica, sans-serif; text-decoration: none}  <<

<STYLE type="text/css">
body { font-family: arial, helvetica, sans-serif;  font-size: 10px;  }
td { font-family: arial, helvetica, sans-serif;  font-size: 10px; }
a:link {color: F76B08;  font-family: arial, helvetica, sans-serif; text-decoration: none}
a:visited {color: FFAD73;  font-family: arial, helvetica, sans-serif; text-decoration: none} 
a:active {color: #ffffff;  font-family: arial, helvetica, sans-serif; text-decoration: none} 
A:hover {text-decoration: none; color: #ffffff}

Open in new window


Author Comment

ID: 21761515
Your code works for links that are pointing to http locations.. like say <a href="http://www.google.com">Google</a>

But, if my links are pointing to JavaScript locations, say <a href="JavaScript:document.forms[0].textName.value='101';document.forms[0].submit();">Submit Form</a>
then it doesnt work once I visit the same page again.

All this code works in IE6, but something has changed in IE7. How can I fix this?


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question