[TW5] populating a table

100 views
Skip to first unread message

Jon

unread,
Mar 7, 2015, 3:01:01 AM3/7/15
to tiddl...@googlegroups.com

Hi
the following will produce a list of tiddlers tagged with "mytag" in 3 columns when the CSS is applied from another tiddler tagged with $:/tags/Stylesheet.

@@.threecolumns
<div>

{{{ [tag[mytag]] }}}

</div>
@@

.threecolumns {
display:block;
column-count:3;
-moz-column-count:3;
-webkit-column-count:3;
color: red;
}

What do I need to introduce to alter the spacing between the columns?

Better still, is it possible to populate a table with a specified number of columns from the tiddlers tagged with mytag?

Thanks,
Jon.

Odder

unread,
Mar 7, 2015, 3:51:53 AM3/7/15
to tiddl...@googlegroups.com
Hi Jon,

to alter the spacing between the columns you have give them a width. In your example you have to add the following css to your code:

-moz-column-width:33%

-webkit-column-width:33%

or whatever you want for the width. For 3 columns with 33%  you have equal distance between the columns.

many regards
odder

Jon

unread,
Mar 7, 2015, 5:18:47 AM3/7/15
to tiddl...@googlegroups.com
Hi Odder,

thanks, but when I tried:

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

I can change the number of columns but adjusting the % width didn't appear to make any difference.

Regards
Jon

Odder

unread,
Mar 7, 2015, 7:13:46 AM3/7/15
to tiddl...@googlegroups.com
Hi Jon,

this is new for me too, because I have only needed fixed width columns. A more flexible method is to use only column-width and not column-count. Then the column number is flexible to the window width (look here: https://css-tricks.com/almanac/properties/c/column-width) but values must be specified in px, not in %. Maybe someone else knows something more about this topic.

Many regards
Odder




Am Samstag, 7. März 2015 09:01:01 UTC+1 schrieb Jon:

Jon

unread,
Mar 7, 2015, 5:09:18 PM3/7/15
to tiddl...@googlegroups.com
Hi Odder,

thanks for the info.

Regards
Jon
Reply all
Reply to author
Forward
0 new messages