How to set table cell width to a percent

37 views
Skip to first unread message

andrew.j.harrison84

unread,
Feb 2, 2012, 9:05:31 AM2/2/12
to tiddly...@googlegroups.com

I'm creating a table and can't set cell width to a percent without <html> tag. Anyone know how to apply like say 30% to the width attribute of a cell in a table using tiddlywiki markup only?

Måns

unread,
Feb 2, 2012, 5:51:04 PM2/2/12
to TiddlyWikiDev
Hi Andrew

> I'm creating a table and can't set cell width to a percent without <html> tag. Anyone know how to apply like say 30% to the width attribute of a cell in a table using tiddlywiki markup only?

|width:30%;font-size:16px;Header |font-size:19px;Another fontsize |h
|height:20px;background-color:#eee;Heigth and color|padding-left:
0.7em;Even padding can be set |

Picked up from Tobias' http://tbgtd.tiddlyspot.com/#desk

Cheers Måns Mårtensson

andrew.j.harrison84

unread,
Feb 5, 2012, 7:25:08 PM2/5/12
to tiddly...@googlegroups.com

I'd just like to say it didn't work until I set custom formatting for my table and set table-format:fixed. Then I discovered that I had to use the exclamation point for each header cell. Then in order to set the cell height, I had to put the width, then the exclamation point, then the cell height and header text enclosed between double @. As follows:
[[Stylesheet]]
.tablegray {table-format:fixed;}
[[My table]]
|tablegray|k
|width:30%;!@@display:block;height:1.2em;margin-top:-3px;Title1@@|width:70%;!@@display:block;height:1.2em;margin-top:-3px;Title2@@|

This whole percent thing would have been alot easier if there were some kind of resource that had this info. Maybe I just don't know where to look. Thank you for your help Måns.

Reply all
Reply to author
Forward
0 new messages