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
https://forums.phpfreaks.com/topic/158653-using-css-to-modify-a-visited-hyperlink/
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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.