Table displayed in single line unless forcing display: table-row

40 views
Skip to first unread message

Sebastián Ortega

unread,
May 31, 2021, 7:21:03 AM5/31/21
to TiddlyWiki
Hello!
Thanks to the great Soren's book I'm getting deeper into customizing my wiki. I'm adding a table with some metadata in tiddlers tagged with Author but, for reasons unknown to me, such table gets flattened into a single line unless I force display: table-row manually.

This is what I've added to the view template:

<$list filter="[all[current]tag[Author]]">
<table>
  <tbody>
    <row style="display: table-row">
      <th align="left">Nationality</th>
      <td>
          <$list filter={{!!nationality}} emptyMessage="Unknown"><<tag>> </$list>
      </td>
    </row>

    <row style="display: table-row">
      <th align="left"><span class="icon">{{$:/core/images/info-button}}</span> Areas</th>
      <td><$list filter={{!!area}}><<tag>> </$list></td>
    </row>
  </tbody>
</table>
</$list>

So I get this:
Screenshot 2021-05-31 at 13.18.51.png

But if I dare to remove the forced table-row:
Screenshot 2021-05-31 at 13.20.16.png

Do you know why this is happening? What can I be doing wrong?

Atronoush Parsi

unread,
May 31, 2021, 7:49:44 AM5/31/21
to tiddl...@googlegroups.com
On Mon, May 31, 2021 at 3:51 PM Sebastián Ortega <mehequeda...@gmail.com> wrote:
Hello!
Thanks to the great Soren's book I'm getting deeper into customizing my wiki. I'm adding a table with some metadata in tiddlers tagged with Author but, for reasons unknown to me, such table gets flattened into a single line unless I force display: table-row manually.

This is what I've added to the view template:

<$list filter="[all[current]tag[Author]]">
<table>
  <tbody>
    <row style="display: table-row">

you mean <tr NOT <row? Why do use style="display: table-row"? when you can use tr tag?
 
      <th align="left">Nationality</th>
Does html 5 recommend align? or css is recommende?
      <td>
          <$list filter={{!!nationality}} emptyMessage="Unknown"><<tag>> </$list>
      </td>
    </row>

    <row style="display: table-row">
      <th align="left"><span class="icon">{{$:/core/images/info-button}}</span> Areas</th>
      <td><$list filter={{!!area}}><<tag>> </$list></td>
    </row>
  </tbody>
</table>
</$list>

So I get this:
Screenshot 2021-05-31 at 13.18.51.png

But if I dare to remove the forced table-row:
Screenshot 2021-05-31 at 13.20.16.png

Do you know why this is happening? What can I be doing wrong?

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b9f8a87a-599c-4a75-8668-9edf095fd01dn%40googlegroups.com.

Sebastián Ortega

unread,
May 31, 2021, 8:37:55 AM5/31/21
to TiddlyWiki
You are very right. My mistake was to use row instead of tr and I was so blind about the mistaken tag.
I've also removed the align attribute. The only reason I added it is because it was present in tables generated with wikitext.

Thanks
Reply all
Reply to author
Forward
0 new messages