RichText Markdown table column spacing: how do I add more space?

What I’m trying to do:
In a RichText component, in a Markdown table, allow a small amount of spacing between columns, for readability.

What I’ve tried and what’s not working:

|              |              |
| ----         | -----        |
| User Name:   | {email}      |
| Joined:      | {signed_up}  |
| Last Log-in: | {last_login} |

yields
image
There’s virtually no space between columns.

I get similar spacing with HTML, unless I insert  , making the ugly HTML even uglier.

Solution
Prepend at least one space into the text of each item, e.g.,

        u = anvil.users.get_user()
        local_tz = anvil.tz.tzlocal()
        user_data = { 
            'email':     ' ' + u['email'],
            'signed_up': ' ' + u['signed_up'].astimezone(local_tz).isoformat(),
            'last_login':' ' + u['last_login'].astimezone(local_tz).isoformat(),
        }
        self.rt_basic_info.data = user_data

You can also use CSS to style your tables, eg by adding this to theme.css:

th, td {
  padding: 20px;
}
1 Like