Tiddler Title question

50 views
Skip to first unread message

axelm

unread,
Jun 11, 2011, 1:28:22 PM6/11/11
to tiddl...@googlegroups.com
Hello All,

how would make the tiddler titles (all of them) appear in the center and not on the left side?

thank you,

axelm


axs

unread,
Jun 11, 2011, 1:49:30 PM6/11/11
to tiddl...@googlegroups.com
If you have a .title{ } definition in your stylesheet, add

text-align:center; 

to it. If you don't have one, add

.title{
text-align: center;
}

to your StyleSheet.


Regards,
axs

axelm

unread,
Jun 11, 2011, 2:01:31 PM6/11/11
to tiddl...@googlegroups.com
Thank you, axs.  That worked.

Then I tried to give the title a "Highlight" color like this:

background-color:#6F0;

but the whole line gets highlighted, I just want the text to highlight.

How do I do that?

axelm


HansBKK

unread,
Jun 12, 2011, 1:52:21 AM6/12/11
to TiddlyWiki
Use Firebug to narrow down your selectors.

axs

unread,
Jun 12, 2011, 6:14:17 PM6/12/11
to tiddl...@googlegroups.com
That won't work because the .title element is a block element, which means it stretches to fill the parent container. One way to achieve the effect you want is to edit your PageTemplate:

change this line:

<div class='title' macro='view title'></div>

to this:

<div class='title' ><span class="highlightTitle" macro='view title'></span></div>


then in your StyleSheet add:

.highlightTitle{
background-color:#6F0;
}


Regards,
axs

axelm

unread,
Jun 12, 2011, 7:41:36 PM6/12/11
to tiddl...@googlegroups.com
In my PageTemplate that line does not exist.

So I just pasted it in anyway, but nothing changes.

Is there another place I should ad it?

axelm


axelm

unread,
Jun 12, 2011, 7:54:41 PM6/12/11
to tiddl...@googlegroups.com
Figured it out. The code you mentioned is in the "ViewTemplate", so I changed that and it worked!!

Thank you very much for your advise,

axelm


axs

unread,
Jun 14, 2011, 3:28:39 PM6/14/11
to tiddl...@googlegroups.com
oops, that's what I meant :) 
glad it's working.

Regards,
axs
Reply all
Reply to author
Forward
0 new messages