What I’m trying to do
Hello.
I want to create a table without header. Do you know of any features or related plugins?
Things I have tried
Download the plugin which called Table extended
Hello.
I want to create a table without header. Do you know of any features or related plugins?
Download the plugin which called Table extended
You could make all tables appear without using bold-formatting by default. You can then add bold-formatting manually to emphasize headers.
The following css-snippet applies live preview editing mode. You should wait for other answers if you want to customize table appearance in reading mode and pdf exports.
*/
:root {
--table-border-color: var(--text-faint);
}
/* Border color */
.cm-s-obsidian .cm-table-widget th,
.cm-s-obsidian .cm-table-widget td{
border-color: var(--table-border-color);
}
/* Bold header row */
.cm-s-obsidian .cm-table-widget th {
font-weight:normal;
}
CSS editor plugin - Obsidian link
CSS editor plugin - repo link
Table that has manually added bold-formatting:
|**header1**|header2|header3|
|-- | -- | --|
|1 | 2 | 3|
You can just ignore the header (don’t fill anything there) and create a custom CSS snippet that removes the header entirely:
th {
display: none;
}
Then you create your table without filling the header fields:
| | |
|---|---|
| sdasda | asdsa |
And the result is as expected in both live preview & reading mode:
Another option is to use HTML tables.
Thank you so much!
@woofy31
I have a question! Is it possible to make CSS code below thing?
“Remove the header when the header is blank, and keep the header when the header is written.”
And thank you so much above reply!
To remove bold formatting from table headers in reading view, use this css snippet:
/* Bold header row */
.markdown-preview-view th {
font-weight:normal;
}
I didn’t managed to include .cm-table-widget
in the code. Do you happen to know is that necessary to select correct th
attribute without unintentionally selecting other th
attributes @CawlinTeffid ? I’m not very good at CSS.
Unfortunately that’s not possible with CSS. For this use case scenario you will have to fall back to using raw HTML table code as @CawlinTeffid mentioned above.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.