Table Header Background Colour Change

72 views
Skip to first unread message

Ken Gray

unread,
Nov 7, 2014, 8:20:58 AM11/7/14
to tiddl...@googlegroups.com
How can I change the header color on a table?  I was thinking css but I'm not sure, one, how to do it or two, if that's the best way to do it.

thanks.

Jeremy Ruston

unread,
Nov 7, 2014, 8:28:41 AM11/7/14
to TiddlyWiki
Hi Ken

> How can I change the header color on a table?  I was thinking css but I'm not sure, one, how to do it or two, if that's the best way to do it.

It depends if you want to change the colour of the header row on all tables, or on a table-by-table basis.

If the former, you can use the colour palette editor in Control Panel to redefine "table-header-background".

If the latter, the easiest approach is to use CSS. First, add a CSS class to your table with a special "k" row:

|myTableClass|k
|!One |!Two |
|Three |Four |

Then define a stylesheet by creating a new tiddler and tagging it "$:/tags/Stylesheet", with the following content:

.myTableClass th {
background: red;
}

If you wanted to change the colour of ordinary table cells the rule would be ".myTableClass td".

Best wishes

Jeremy.



On Fri, Nov 7, 2014 at 1:20 PM, Ken Gray <kene...@gmail.com> wrote:
How can I change the header color on a table?  I was thinking css but I'm not sure, one, how to do it or two, if that's the best way to do it.

thanks.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Ken Gray

unread,
Nov 7, 2014, 9:14:49 AM11/7/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Perfect!
thanks!!
Reply all
Reply to author
Forward
0 new messages