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

CSS for tables in article-post #135

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion _posts/2018-06-12-powerful-things-markdown-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,17 @@ The quick brown jumped over the lazy.

Another way to insert links in markdown is using reference lists. You might want to use this style of linking to cite reference material in a Wikipedia-style. All of the links are listed at the end of the document, so you can maintain full separation between content and its source or reference.

## Tables

{:.myTable}
| Tables | Are | Cool |
|:--------:|:-------------:|:-----:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |

## Full HTML

Perhaps the best part of Markdown is that you're never limited to just Markdown. You can write HTML directly in the Markdown editor and it will just work as HTML usually does. No limits! Here's a standard YouTube embed code as an example:

<p><iframe style="width:100%;" height="315" src="https://www.youtube.com/embed/Cniqsc9QfDo?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe></p>
<p><iframe style="width:100%;" height="315" src="https://www.youtube.com/embed/Cniqsc9QfDo?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe></p>
15 changes: 14 additions & 1 deletion assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -898,4 +898,17 @@ iframe {
.lazyimg[data-srcset] {
opacity: 0;
transition: opacity .25s;
}
}

div.article-post>table {
width: 100%;
margin-bottom: 2rem;
border: 1px solid #ddd;
border-collapse: collapse;
}

div.article-post>table td, th {
border-bottom: 1px solid #ddd;
}

div.article-post>table tr:hover {background-color:#f5f5f5;}