Tags:
create new tag
view all tags

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

TWiki version: unspecified
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- VickiBrown - 07 Mar 2008

Answer

ALERT! 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:
    TWikiTable_CSS.jpg

-- VickiBrown - 02 Jun 2008

Change status to:

Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg TWikiTable_CSS.jpg r1 manage 26.8 K 2008-06-02 - 22:59 UnknownUser screenshot
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-06-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.