format part of a tiddler to use 2 columns

16 views
Skip to first unread message

rroque

unread,
Oct 15, 2007, 8:53:34 PM10/15/07
to TiddlyWiki
Is there an easy way to format part of a tiddler, to use 2 columns for
text, without using tables, which are rather tricky with paragraphs

Thanks

Daniel Baird

unread,
Oct 15, 2007, 9:27:29 PM10/15/07
to Tiddl...@googlegroups.com
AFAIK there isn't any consistent browser support for automatically
flowing text into two columns. You basically just need to fake it
with divs or tables or whatever.

I think CSS3 supports text columns, so give it 5 years or so and it'll
work in all browsers (except IE :).

;Daniel


--
Daniel Baird
"In teh beginnin Invisible Man was invisible, and he maded the skiez
and da earths, but he did not eated it." -- Genesis 1:1,
lolcatbible.com

Eric Shulman

unread,
Oct 15, 2007, 9:53:13 PM10/15/07
to TiddlyWiki
> Is there an easy way to format part of a tiddler, to use 2 columns for
> text, without using tables, which are rather tricky with paragraphs

CSS3 for flowed multi-column text works in FireFox, but not in IE.
I've used the following class definitions:

.twocolumns
{ display:block; -moz-column-count:2; -moz-column-gap:1em; -moz-column-
width:50%;}

.threecolumns
{ display:block; -moz-column-count:3; -moz-column-gap:1em; -moz-column-
width:33%}

.fourcolumns
{ display:block; -moz-column-count:4; -moz-column-gap:1em; -moz-column-
width:25%}

ref: http://www.TiddlyTools.com/#StyleSheetShortcuts

HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

etc.

rroque

unread,
Oct 16, 2007, 10:14:46 AM10/16/07
to TiddlyWiki
Thanks Daniel

The prob with using tables is that everytime I want to change line I
must write <br>

Renato


On Oct 16, 2:27 am, "Daniel Baird" <danielba...@gmail.com> wrote:
> AFAIK there isn't any consistent browser support for automatically
> flowing text into two columns. You basically just need to fake it
> with divs or tables or whatever.
>
> I think CSS3 supports text columns, so give it 5 years or so and it'll
> work in all browsers (except IE :).
>
> ;Daniel
>

rroque

unread,
Oct 16, 2007, 10:19:33 AM10/16/07
to TiddlyWiki
Thanks Eric

I tried

.twocolumns
{ display:block; -moz-column-count:2; -moz-column-gap:1em; -moz-
column-
width:50%;}

in the StyleSheet

and using

{{twocolumns{

TEXT

}}}

in the tiddler, but I see nothing happening in FireFOX

Anything more I forgot?

Renato

Eric Shulman

unread,
Oct 16, 2007, 10:29:27 AM10/16/07
to TiddlyWiki
> .twocolumns
> { display:block; -moz-column-count:2; -moz-column-gap:1em; -moz-
> column-
> width:50%;}

GoogleGroups added some linebreaks where they don't belong... which
seems to have split the "-moz-column-width" attribute declaration.

Re-written to avoid long lines, the CSS should look like this:

.twocolumns {
display:block;
-moz-column-count:2;
-moz-column-gap:1em;
-moz-column-width:50%;
}

> and using
> {{twocolumns{
> TEXT
> }}}
> in the tiddler, but I see nothing happening in FireFOX

I assume that "TEXT" is actually several lines of content? The
browser's column layout logic uses linebreaks, no wordbreaks, to
determine where to split the columns. If you have only one line of
text, it will never appear in two columns, regardless of how long that
line of text is.

This DOES seem to work for me:

{{{twocolumns{
foo
bar
baz
mumble
}}}

I get two columns:

foo baz
bar mumble

Gam

unread,
Oct 16, 2007, 10:35:39 AM10/16/07
to TiddlyWiki

You can also achieve the columns with Floatboxes (search Floatbox)

Ive used this with sucess, you need to define the Floatboxes in your
Stylesheet I believe. (left, centered, right ...) I know there is a
site somewhere on the net that has a great example of this.
If I can recall it, I'll post it here.

I use this to place images in the top left corner of my tiddlers, and
then a centered floatbox (to use as an intro paragraph) of a
different color background from the body of the tiddler. You can use
it to have "magazine" columns , I don't know if youcan have the text
flowing to the next column though, that may need to be faked.

Reply all
Reply to author
Forward
0 new messages