Can I have Different Table Style?

162 views
Skip to first unread message

James

unread,
May 10, 2015, 10:13:00 PM5/10/15
to tiddl...@googlegroups.com
The table design, especially the table header fall back to the default design "grey color" when I use the classic "@@." command to define the CSS style for my table.
When I define it in HTML format, "<Table Class="".." it seems ok.

Can anyone guide me on this?

Thanks.

Jeremy Ruston

unread,
May 11, 2015, 4:06:43 PM5/11/15
to TiddlyWiki
Hi James

You can add a class to a table with a special row marked with a "k" like this:

|myclass|k
|the |rest |of |my |table |

Best wishes

Jeremy


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/943ac901-5dea-433c-ba90-c54bd546c03a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



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

James

unread,
May 11, 2015, 9:54:03 PM5/11/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi Jeremy,

Thanks for your response.

I able to apply the class on my table, but the table header remain as default grey color.  Is there any way I can change it?

Jeremy Ruston

unread,
May 12, 2015, 7:59:28 AM5/12/15
to James, TiddlyWiki
Hi James


I able to apply the class on my table, but the table header remain as default grey color.  Is there any way I can change it?

You'll also need to create a stylesheet that defines the appropriate class; apologies I took it from your earlier post that you already had one set up. To define a new stylesheet, create a tiddler with the tag $:/tags/Stylesheet and the following content:

html table {
border: 1px solid red;
}

html table th, html table td {
border-top: 1px solid blue;
border-left: 1px solid green;
}

html table thead tr td, html table th {
background-color: purple;
}

html table tfoot tr td {
background-color: orange;
}

By the way, if all you want to do is to globally change the table header or footer background colours then you can do so by creating a custom palette - see the "Appearance"/"Palette" tab of control panel.

Best wishes

Jeremy

James

unread,
May 12, 2015, 9:54:23 PM5/12/15
to tiddl...@googlegroups.com, jeremy...@gmail.com, jimmy....@gmail.com
Thanks Jeremy,

It works now. 

Danielo Rodríguez

unread,
May 13, 2015, 1:35:53 PM5/13/15
to tiddl...@googlegroups.com
Hello Jeremy,

Could you expand a bit that k class thing?

Jeremy Ruston

unread,
May 13, 2015, 6:41:23 PM5/13/15
to TiddlyWiki
Hi Danielo

Could you expand a bit that k class thing?

Basically, each table row marked with a "k" specifies a class to be added to the table element. It's documented at the end of this tiddler:


It's a feature of the table wikitext that was carried over from TWC.
 
Best wishes

Jeremy.


--
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.
Reply all
Reply to author
Forward
0 new messages