Obsidian tables don't adjust columns properly

Things I have tried

I tried to use a standard markdown table to display a 2/2 table (two columns / two rows).

Filled each cells of the last row with text (two experiments with a bit less text on the left in case 2) :

[Case 1]

  • [left cell] = 614 words 3,949 characters
  • [right cell] = 665 words 3,801 characters

[Case 2] (Removing 162 words from the left cell)

  • [left cell] = 452 words 2896 characters
  • [right cell] = 665 words 3,801 characters

Expected result

The largest column will be that containing the most text.

The columns will adjust themselves so that the one containing more text will be larger, so that the text in both columns will appear the same length (from top to bottom)

Actual result

Columns don’t adjust properly (like they’d do in typora for instance), resulting in large empty spaces at the top and bottom of left column.

The largest column is always the left one :

[Case 1] Left cell has more characters but less words than right cell
=> Left column is quite larger

[Case 2] Left cell has less characters and EVEN less words than right cell
=> Left column is LESS large, but still larger.

The adjustment works properly for smaller quantities of text though. Strange thing, I don’t really understand.

Are you using any themes, like Minimal? Do the tables behave the same in the sandbox vault?

I’m using Minimal. The same thing happens in the Sandbox Vault though.

You’re giving your browser a lot to choose on, when you start expanding the column widths out over default values (aka in the need of overflowing/line breaking). And since browsers usually don’t care that much/have good logic on this, you would need to add styling to help it on its way.

In other words, don’t trust the automatic, but try adding CSS styling to the tables to help it choose better widths. Within Obsidian you can add your own styling using CSS snippets, and since this possibly not is applicable to every table, I would consider setting the cssClass for the given note, and doing adaption to the table styles within that combination of your class and the tables.

haha thanks, I was hoping I still had time to remain innocent in terms of css. Been lurking around this css thing for a while now… it looks scary. Every threads on the subject seem to assume all of us knows about it : “just use css” or “just add a snippet”. Sure…! ^^ Well, I guess it’s time to have a look at it !

I was wondering if maybe there was a way to just copy Typora table’s css maybe ? it seems their tables are neatly optimized.

Thanks for the help. I’ll go digging into that css monster then.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.