table within a line of text

4 views
Skip to first unread message

Kelsoe

unread,
Jun 20, 2009, 5:30:01 PM6/20/09
to TiddlyWiki
Greetings all,

Hopefully this is an easy question. How can I put a table within a
line of text? For example, the code

a |b| c

does not put "b" within a table -- it looks like absolute value of b.

Thanks in advance for any assistance!

Mark S.

unread,
Jun 20, 2009, 9:05:12 PM6/20/09
to TiddlyWiki
Do you really want a table there, or did you just want to put "b" in a
box? If the latter, then something like:

a @@border: 2px solid green;padding: 2px;B@@c

will generate the effect.

/Mark*S/

Kelsoe

unread,
Jun 20, 2009, 9:07:18 PM6/20/09
to TiddlyWiki
I was actually hoping for a table. Is it possible?

FND

unread,
Jun 21, 2009, 4:07:32 AM6/21/09
to Tiddl...@googlegroups.com
> How can I put a table within a line of text?

Well, tables are HTML block elements, and as such are not meant to be
used inline.

You might be able to achieve it with some hacks though.
First, make the wiki markup work inline by using transclusion[1]; create
a tiddler "myTable" and add your table with a custom class[2] "inlineTable".
Then transclude that tiddler into your original tiddler and add the
following to your StyleSheet:
.inlineTable {
display: inline;
}

HTH.


-- F.


[1] http://tiddlywiki.org/wiki/Transclusion
[2] http://tiddlywiki.org/wiki/Tables#Custom_CSS_Classes

Mark S.

unread,
Jun 21, 2009, 12:41:02 PM6/21/09
to TiddlyWiki
Hmm. That sort of works. The table is inline between objects on the
line. But the table has artifacts. The text in the cells floats so
that it overlaps the table, and there are parts of a table-like
structure protruding out of the top of the real table. Looking in
FireBug, it looks as though the table and tbody are out of sync with
each other. Maybe some other CSS would make the table behave more like
a table.

Mark S.

FND

unread,
Jun 22, 2009, 9:18:15 AM6/22/09
to Tiddl...@googlegroups.com
> Hmm. That sort of works. The table is inline between objects on the
> line. But the table has artifacts. [...]

> Maybe some other CSS would make the table behave more like a table.

You could try "inline-block" instead of "block".
However, that's not necessarily well-supported across browsers:
http://www.webdevout.net/browser-support-css#support-css2propsbasic-display


-- F.

Reply all
Reply to author
Forward
0 new messages