SharkBait Posted May 27, 2009 Share Posted May 27, 2009 Okay, I'm trying to figure out what I am doing wrong here. I want to change the colour of a table's header (<th></th>) using CSS. This is what I have, but Firebug is showing its invalid or its ignoring it. Firefox is using the default a:link properties instead. <style> .files { background-color: #36c; } .files th a:link, .files th a:visited, .files th a:active { color:#fff; } </style> <table class="files"> <tr> <th><a href="#">Link 1</a></th> <th><a href="#">Link 2</a></th> </tr> <tr> <td>Stuff here</td> <td>Stuff here too</th> </tr> </table> Does that not look right? Using Firefox with Firebug, it shows that its ignoring the .files portion of the style and using whatever the set a:link, a:visited, a:hover, a:active properties which makes the Link text the same colour as the background. Link to comment https://forums.phpfreaks.com/topic/159893-table-header-link-colours/ Share on other sites More sharing options...
Axeia Posted May 27, 2009 Share Posted May 27, 2009 Link pseudo classes are a bit iffy due to the sequence being of importance. What happens if you just do .files th a:link{ color:#fff; } Link to comment https://forums.phpfreaks.com/topic/159893-table-header-link-colours/#findComment-843358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.