On Saturday, January 21, 2017 at 7:29:38 PM UTC+1, Odder wrote:
>
> I have a tebmenu with 6 tabs and I want each tab with a different 
> background-color? Is this possible maybe with css?
> Odder
>

Yes, unless I misunderstand you. 

title:whateveryouwant
tags:colortabs

<<tabs "one two three four" "one">>

<style>
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(1) {background:blue;}
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(2) {background:green;}
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(3) {background:yellow
;}
.tc-tagged-colortabs .tc-tab-buttons button:nth-child(4) {background:red;}
</style> 

The reason you need the tag "colortabs" is to prevent the styling from 
affecting all tabs in the TW. Instead you can then use .tc-tagged-colortabs 
to limitit it to that particular tiddler.

Generally, you'd not want to put the styles in the tiddler itself but in a 
separate stylesheet tiddler, i.e any tiddler with the tag 
"$:/tags/Stylesheet". And you omit the <style> tags there, just put the 
lines starting with .tc-tagged..... etc

<:-)

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/850458fa-5624-4d18-a391-c009f8c4f2c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to