Jump to content

Table header & Link Colours


SharkBait

Recommended Posts

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

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.