Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Show Tables ? #170

Open
fjolublar opened this issue Mar 13, 2021 · 3 comments · May be fixed by #197
Open

[Question]: Show Tables ? #170

fjolublar opened this issue Mar 13, 2021 · 3 comments · May be fixed by #197

Comments

@fjolublar
Copy link

Working with md files you can create table like:

Col_Name_1 Col_Name_2
Value_1 Value_2

Trying this in a post doesn't show the table (lines of the table). It just does the sorting.

Any help on how to show also the table?

@daviddarnes
Copy link
Owner

daviddarnes commented Mar 13, 2021

Looks like my theme is missing some table styles! I think this is the first time it's been requested though. For now you could add some styles to add a background to the heading row and every other row to help with readability. Here's some example code:

thead tr,
tr:nth-of-type(2) {
  background: #f4f4f4;
}

td {
  border: 1px solid #f4f4f4;
}

@fjolublar
Copy link
Author

I found this workaround on Stack and it worked for me:

Adding this at the beginning of the post:

<style>
.tablelines table, .tablelines td, .tablelines th {
        border: 1px solid black;
        }
</style>

and this after the tables:

{: .tablelines}

@daviddarnes
Copy link
Owner

Really nice solution @fjolublar, I'm going to add table styles into the latest update. Thanks for highlighting this issue

@daviddarnes daviddarnes linked a pull request Dec 31, 2023 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants