Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/13816-links-color/
Share on other sites

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
Link to comment
https://forums.phpfreaks.com/topic/13816-links-color/#findComment-53757
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.