IE7 Visited links CSS

Posted on 2008-06-11
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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="">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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

734 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