I can't get the Hyperlinks on this web page to respond to the CSS, what am I doing wrong? http://www.dynamata.com/flam/player.html Stylesheet code: td.right2 { padding: 0.2cm border: thin solid Silver; background-color: #000080; a:link {color: #FF0000} a:visited {color: #00FF00} a:hover {color: #FF00FF} a:active {color: #0000FF} } Web-page column: <td class="right2" width="25%" align="center" valign="top"> <font font size="1" color="white" face="verdana"><i><b>All songs Copyright © 2008</b></i></font> <hr size="4"/> <font font size="2" color="white" face="verdana"><b>LYRICS</b></font> <hr size="4"/> </p> <a href="http://www.dynamata.com/songs/Graffiti_Highway_c.txt" >Graffiti Highway</a> <a href="http://www.dynamata.com/songs/Graffiti_Highway_c.txt" >Graffiti Highway</a> <a href="http://www.dynamata.com/songs/Graffiti_Highway_c.txt" >Graffiti Highway</a> </td>
Change your CSS to: td.right2 { padding: 0.2cm border: thin solid Silver; background-color: #000080 } a:link {color: #FF0000} a:visited {color: #00FF00} a:hover {color: #FF00FF} a:active {color: #0000FF}
Thanks! that works, I don't know why. I spent hours trying variations but I didn't think you could place the CSS outside the brackets without affecting other elements.
write CSS like this #td.right2 a:link {color: #FF0000} #td.right2 a:visited {color: #00FF00} #td.right2 a:hover {color: #FF00FF} #td.right2 a:active {color: #0000FF} Code (markup): and use ID to invoke the style