Created
August 22, 2022 15:59
-
-
Save hector6872/008b1edc68bf86267d9151d443f81dbf to your computer and use it in GitHub Desktop.
Adds horizontal scrolling to tables in Obsidian Notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Adds horizontal scrolling to tables in Obsidian Notes. Tested in Obsidian v0.15.9 | |
See also: https://forum.obsidian.md/t/css-horizontal-scrolling-tables/26581/4 | |
*/ | |
/* in preview / read mode */ | |
.markdown-preview-view table , | |
.markdown-source-view table { | |
display: block; /* This is needed for scrollbar */ | |
width: 100%; | |
max-width: -moz-max-content; | |
max-width: max-content; | |
margin: 0 auto; /* this centers the table */ | |
overflow-x: auto; /* This is needed for scrollbar */ | |
white-space: nowrap; /* Keeps each cell on one line */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment