takeiteasy Posted July 6, 2006 Share Posted July 6, 2006 hi all,Just wanted to ask if there's any code which will auto restore back the settings of the link color whenever user opens the page..Like for example, my current code is[code]a:link {text-decoration: none; color: #ffffff; cursor:crosshair}a:visited {text-decoration: none; color: #0000CC; cursor:crosshair}a:active {text-decoration: underline; color: #444444; cursor:crosshair}a:hover {text-decoration: underline; color: #6699FF; cursor:crosshair}[/code]The very first time i open the page, the color is #ffffff, after i visited the links, the visited links become #0000CC. Then the second time i visit the page, the links are still in #0000CC color. But what i wanted is the links to be back to #ffffff color everytime i visit the page again.Has this got to do with the codes?or because of my computer? it has the windows function which it will save the datas which i have entered before. Quote Link to comment https://forums.phpfreaks.com/topic/13816-links-color/ Share on other sites More sharing options...
wildteen88 Posted July 6, 2006 Share Posted July 6, 2006 Its becuase of this:[code]a:visited {text-decoration: none; color: #0000CC; cursor:crosshair}[/code]When when ever you click a link the browser records this, then when the browser is creating the link it checks whether you have clicked that link before, it you have it'll apply your hover class. It'll do that everytime you visit the link again until you clear you cache/history.The optoin is to leave as it is or change 0000CC to FFFFFF Quote Link to comment https://forums.phpfreaks.com/topic/13816-links-color/#findComment-53757 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.