Advice for maxing the width?

121 views
Skip to first unread message

David Gifford

unread,
Feb 24, 2015, 8:06:02 PM2/24/15
to tiddl...@googlegroups.com
Hi guys

Sorry to bombard with so many questions since Saturday. This should be the last one for a while.

I have a TiddlyWiki in which the screen will be shown full width, so that it expands for mobile screens and the sidebar is hidden. But on laptop screens the text goes the whole width of the screen, which is hard to read. I tried wrapping the text in a div and specifying in the CSS width:600px, but nothing happened. Tried max-width, too.

Any CSS or other advice to limit certain selected texts in my TW to 600px width, even when the tiddler gets expanded as the sidebar is hidden?

Dave

Andreas Hahn

unread,
Feb 24, 2015, 11:42:19 PM2/24/15
to tiddl...@googlegroups.com
Hi Dave,

TiddlyWiki automatically expands the width of a tiddler to 100%, when the sidebar is hidden (or the screen isn't wide enough). To limit that, you can, as you said, set max-width for the .tc-tiddler-frame css class:

div.tc-tiddler-frame {
max-width: 600px;
}

If you want to make it work with the tiddler width set in the control panel (assuming you are using a theme based on the vanilla theme), you can take the value for the tiddler width as you max-width:

div.tc-tiddler-frame {
max-width: {{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}};
}

/Andreas
--
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.

David Gifford

unread,
Feb 25, 2015, 6:50:50 PM2/25/15
to tiddl...@googlegroups.com
Hi Andreas, thank you, that worked splendidly!

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/J1VoenrT2jo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages