efemkay / obsidian-modular-css-layout

CSS Layout hack for Obsidian.md
https://efemkay.github.io/obsidian-modular-css-layout/
GNU General Public License v3.0
918 stars 74 forks source link

Center wide tables? #69

Closed ironhak closed 4 months ago

ironhak commented 8 months ago

Hello! When I use cssclass wide-table the table is centered on reading view but on live-preview is aligned to the left. Is it possibile to have it centered so that live-preview and reading view are identical?

Thank's

ironhak commented 8 months ago

Anyone?

efemkay commented 8 months ago

here there @ironhak , didn't realised it wasn't centered in LP. i always intent it to be centered. i will update the snippet for that. in the meanwhile, if u need the correction now, simply add the following lines

.wide-table .table-wrapper {
    margin-inline: auto;
}
ironhak commented 8 months ago

Thank's so much!! I would also like to ask: is there a way to get in-app updates of your snippets? I see you're suggesting to use Obsidian Snippet Downloader but apparently it's not mantained anymore and also removed from plugin store.

Thank's again

efemkay commented 7 months ago

at the moment, i don't have other alternatives. you may install the plugin via BRAT (see link below) or manually download the snippets (steps as per link below as well)

https://efemkay.github.io/obsidian-modular-css-layout/installation/

kazerniel commented 4 months ago
.wide-table .table-wrapper {
    margin-inline: auto;
}

unfortunately this does not work for me, wide-table is still left-aligned in live preview mode

Edit: I guess it's something to do with the global toggle? With that one it stays left aligned, but with the class being set on the individual page, it's centred 🤔

ironhak commented 4 months ago
.wide-table .table-wrapper {
    margin-inline: auto;
}

unfortunately this does not work for me, wide-table is still left-aligned in live preview mode

Edit: I guess it's something to do with the global toggle? With that one it stays left aligned, but with the class being set on the individual page, it's centred 🤔

It used to work, apparently recent updates broke it... Anyone knows a solution?

ironhak commented 4 months ago

Solution:

table, .table-wrapper  {
    margin-inline: auto;
}