Jump to content

Using CSS to modify a visited hyperlink


ArizonaJohn

Recommended Posts

Hello,

 

I am dynamically generating an HTML table in PHP.  The cells in the third column of the table are hyperlinks.  I would like these cells to turn white (color #FFFFFF) after the hyperlink has been clicked.  I can't get the CSS to do this.  It seems to me that all of my applicable CSS would turn the "visited" link white, but it's not.

 

Below is the code for this column.  What CSS would be best to make the cells in this column turn white after they have been clicked?

 

Thanks in advance,

 

John

 

 

print "<td class='ballot'>".'<span class="button" id="button'.$row['id'].'">'.'<a href="javascript:;" class="cell1" id="'.$row['id'].'">'.Vote.'</a>'.'</span>'."</td>";

Link to comment
Share on other sites

w3schools knows it all

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!

 

Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!

 

Note: Pseudo-class names are not case-sensitive.

 

Note: Pseudo-classes can be also be combined with CSS classes:

a.red:visited {color: #FF0000}

<a class="red" href="css_syntax.asp">CSS Syntax</a>

Link to comment
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.