Question
When a TABLE is sortable, the header text is converted to links. These take on the global colors for a:link, etc. Unfortunately, these may not be easily readable against the defined headerbg for the table.
I tried
<style>
a.tablesort:link { color: white; }
a.tablesort:visited { color: white; }
a.tablesort:active { color: white; }
</style>
<div class="tablesort">
%TABLE{ headerbg="#325C74" headercolor="#FFFFFF" databg="#FFFFFF" dataalign="center" tablewidth="90%" sort="on" }%
| ... |
</div>
with no success. Can anyone suggest something that will work?
(It looks like this problem has been solved in the more recent versions of TWiki; i.e.
TablePlugin seems to use the specified colors even when it convert header text to links. Unfortunately, my Company is stil on TWiki 4.0.5 and upgrading is not the best immediate solution.)
Environment
--
VickiBrown - 07 Mar 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
We've upgraded
TablePlugin to the March 2008 version but still; not seeing the headercolor "sticking" for sortable columns. We're still on TWiki 40.5 as the base; apparenrtly missing some additional file or CSS. Help??
--
VickiBrown - 25 Apr 2008
Your CSS is not correct. It should be:
.tablesort a:link { color: white; }
.tablesort a:visited { color: white; }
.tablesort a:active { color: white; }
Note that you can also use the
id parameter. With
id="test":
table#test a:link { color: white; }
table#test a:visited { color: white; }
table#test a:active { color: white; }
--
ArthurClemens - 26 Apr 2008
Alternatively, I've figured out how to override the
TablePlugin CSS (
PatternSkin)
<style>
.twikiTable th a:link,
.twikiTable th a:visited,
.twikiTable th a font {
color:#fff;
}
.twikiTable th a:hover,
.twikiTable th a:hover font {
background-color:transparent;
color:#fff;
border-color:#D6000F; /*T4*/
}
</style>
%TABLE{sort="on" headerbg="#325C74" headercolor="#ffffff" databg="#FFFFFF,#FFFFFF" headerrows="1" tableborder="1" tablerules="all"}%
| *Col 1* | *Col 2* | *Col 3* | *Col 4* | *Col 5* |
|a | b | c | d | e |
- screenshot:
--
VickiBrown - 02 Jun 2008