Fix the position of the table scroll bar
This commit is contained in:
parent
dfba411d61
commit
505da84a26
2 changed files with 7 additions and 3 deletions
|
@ -4,7 +4,10 @@
|
||||||
|
|
||||||
{% assign _content = include.content %}
|
{% assign _content = include.content %}
|
||||||
|
|
||||||
<!-- Suroundding the markdown table with '<div class="table-wrapper">. and '</div>' -->
|
<!--
|
||||||
|
In order to allow a wide table to scroll horizontally,
|
||||||
|
we suround the markdown table with `<div class="table-wrapper">` and `</div>`
|
||||||
|
-->
|
||||||
{% if _content contains '<table>' %}
|
{% if _content contains '<table>' %}
|
||||||
{% assign _content = _content
|
{% assign _content = _content
|
||||||
| replace: '<table>', '<div class="table-wrapper"><table>'
|
| replace: '<table>', '<div class="table-wrapper"><table>'
|
||||||
|
|
|
@ -771,14 +771,15 @@ img {
|
||||||
|
|
||||||
|
|
||||||
/*--- Begin of Markdown table style ---*/
|
/*--- Begin of Markdown table style ---*/
|
||||||
div.post-content .table-wrapper {
|
|
||||||
|
.table-wrapper { // it will be created by Liquid
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
|
||||||
> table {
|
> table {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
|
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
|
||||||
|
|
Loading…
Reference in a new issue