How to use nested styles or CSS classes?

108 views
Skip to first unread message

Fadel M

unread,
Jun 3, 2018, 3:55:14 PM6/3/18
to TiddlyWiki
Hi,

I have a table which I have enclosed in:
@@font-size: 80%; @@

I would like to assign a class to some of the table cells to e.g. change color. How can I go about doing that?

Fadel M

unread,
Jun 3, 2018, 4:24:17 PM6/3/18
to TiddlyWiki
Okay, never mind. I was doing it outside the table cell like this @@.class |Table cell | @@
Once I placed the tags inside the table cell it worked |@@.class Table cell @@ |

Fadel M

unread,
Jun 3, 2018, 4:50:18 PM6/3/18
to tiddl...@googlegroups.com
I can't figure out how to change color for tiddler links in table cell, though.

EDIT: I figured that out as well. 
.class a{
color
: red;
}
I guess this whole thread got made because frustration got the better of me.

TonyM

unread,
Jun 3, 2018, 7:32:37 PM6/3/18
to TiddlyWiki
Fadel,

You can also define tables using html code in WiddlyWiki such as here https://www.w3schools.com/html/html_tables.asp

You can even wrap table rows, even table details with list widgets, but you can also place style= or class= against most of the elements as well.

However I am still trying to determine all the possibilities and limitations.

Regards
Tony

Mark S.

unread,
Jun 3, 2018, 9:02:28 PM6/3/18
to TiddlyWiki
CSS always drives me up the wall. I guess that's why I just concentrate on functionality and leave the appearance to someone else.

One approach, that sometimes works, is to right click on the element you are interested in and "Inspect Element" (different but similar terms on different browsers). Then navigate up and down the structure in the developer window, noting what tc- classes are used. Then manually try over-riding the classes to see what you can change. When you get something to work, you can try it in a stylesheet tiddler. If that doesn't work, it usually means you have to notch up the specificity, so that your custom style gets applied.

Good luck!
-- Mark
Reply all
Reply to author
Forward
0 new messages