coloring a cell in a table

598 views
Skip to first unread message

John

unread,
Aug 16, 2015, 1:54:24 AM8/16/15
to tiddl...@googlegroups.com
how can a particular cell or row of a table be formatted to be a specific background-color?

Tried @@background-color:#CCC
to the cell contents, but it only applies the color to the content background not the entire cell.

Documentation says a css-class can be used.
Should the css class be defined as a separate tiddler with content type text/css and be transcluded in the table tiddler using the <<classname>> ?

--
Strawberry 
മദാമ്മയേതായാലും കൊണം  ഉണ്ടായാൽ മതി

Birthe C

unread,
Aug 16, 2015, 4:36:41 AM8/16/15
to TiddlyWiki
Hi John,

Tobias found a way to format the cells of a table http://tobibeer.github.io/tb5/#Formatting%20Table%20Cells


BIrthe

John

unread,
Aug 16, 2015, 5:48:41 AM8/16/15
to tiddl...@googlegroups.com
Thanks.
So apply a div tag to the content and apply the css-class and compensate to fill the cell.

I also found a previous post that suggested using

<html><style>

.mytablecss tr:nth-child(1){
background-color: #FBEFF8;
}

</style></html>

inside a tiddler without defining an external style sheet like "$:/styles/mytablecss"

Birthe C

unread,
Aug 16, 2015, 8:02:47 AM8/16/15
to tiddl...@googlegroups.com
Hi John,

I like the explanation given here: https://groups.google.com/d/msg/tiddlywiki/MjlI_7uM8VM/nB3AG82GGgAJ


Birthe
Reply all
Reply to author
Forward
0 new messages