Skip to content

Instantly share code, notes, and snippets.

@kylehughes
Created May 21, 2023 00:13
Show Gist options
  • Save kylehughes/b2f83d7ed5ba58b173e01ea5312851cf to your computer and use it in GitHub Desktop.
Save kylehughes/b2f83d7ed5ba58b173e01ea5312851cf to your computer and use it in GitHub Desktop.
CSS for Dataview in Obsidian to give maximum width to the first column, prevent all columns from wrapping, and truncate the first column when necessary.
.table-view-table {
width: 100%;
}
.table-view-table td:not(:first-child) {
white-space: nowrap;
}
.table-view-table tr td:first-child, tr th:first-child {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 0;
width: 100%;
}
@tobalsan
Copy link

tobalsan commented Dec 7, 2024

neat! Thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment