HowTo: Fixed column width in table

Problem:

In my Persons-note I have a table for each letter in the alphabet (some letters share a table, like C-D). The columns of the different tables (Name and Description) have different widths assigned automatically: e.g. in one table colum Name is wider than in the next table.

image

There are some thoughts on this problem in Controlling the width of table columns - Help - Obsidian Forum, but either they don’t look good or they work only in edit- or reading-mode. Since I almost never use reading-mode, it was important for me to have a solution that works in every mode.

I tried to solve it via CSS, but I don’t know CSS very well, and I didn’t find a solution to copy.

Solution:

The solution I found may not be very professional, but it works. I added invisible characters to the title. There are different invisible Unicode characters I tried, but Obsidian obviously collapses some of them. Character U+3000 doesn’t collapse when you put it behind your headers.

You have to test how often you have to insert the character after Name and Description so that it looks good. Since my table headers are identical (Name and Description), I only had to write it once and copied it into all the other tables.

You can copy the U+3000 here: “ ” U+3000 Ideographic Space Unicode Character (compart.com). Just select the white box at the top of the page and copy it into your table header.

Maybe this will help someone.

1 Like

Whle it’s a good solution, I guess my only reservation about this is if you then look at the note outside of obsidian it may or may not look very nice depending on what you use to view it.

Yes, you are totally right. My main focus though is Obsidian, and for me it’s very important that my working environment looks good :slight_smile: . A series of tables, for example, which do not fit together, actually distract me from my actual work :smiling_face: .

A better solution is fixed column width

1 Like