Can you set the width of a cell?

Hello everyone.

Do you know if there is any way to set the size of a cell in a table so that it does not increase or decrease. And if its content is larger, it is distributed over several lines but does not increase the size of the cell.
I say this because in a table that I have, sometimes the content of the second column is larger than the gap and what the code does is shrink the first column. And that’s what I don’t want.

This is an example tiddler…
New Mod-probar.json (1.7 KB)

Another thing I can’t do is put a link from a field to a table cell in the same way as it is done in TW: [[Link|http:/ssssss.com]]

I have tried: <a href="{{!!url}}">Web link</a> but the result does not appear in the format of a web link.

Do you know any solution to this problem?

Thank you so much.

Hi, Have a close look at: https://tiddlywiki.com/#Tables%20in%20WikiText%20CSS%20Utility%20Classes

There may be something usable. Especially the last example … But tables have their own “live” so it’s hard to predict.

1 Like

Use CSS.

  1. add table-layout:fixed; to your <table> element.

  2. add whatever width you want to your <td> elements: e.g. width:10em; (or rem)

  3. Add word-break:anywhere; to your <td> elements. This a key (but subtle) point that allows long strings without spaces to be “streamed” within the width you set. Otherwise, the browser will mess up your sizes or do other things you won’t appreciate.

Here’s a fiddle you can play around with: Edit fiddle - JSFiddle - Code Playground

Good luck!

3 Likes

Hello Mario.
Thanks for the information, he didn’t know about those new parameters. I’ll try a little to see if I can get something.

Thank you very much CodaCode!!!

Your instructions have worked for me, and with the link you provided I have been able to do some tests to better refine my board model.

Do you have any idea why the linktext in the cells doesn’t work for me???

Thanks.

It works without quotes:

I already found the bug why the web links did not appear in blue for me. I was testing a wiki where I installed a bunch of plugins and some of them changed that aspect. I have imported the tiddler in question on the Tw online page and everything works correctly.

Thank you very much again.