Log in Sign up

Tables on the Magazine template?

Please add table support to the Magazine template, it doesn't display vertical lines. Or tell me what needs to be transferred from the Blog template, because they work there.


a year ago, 3 replies   developers   templates   magazine   Edit question

This was a decision I made when designing the magazine template. Tables are of course supported, they just don't appear the way you like at the moment.

If you want to add vertical borders between the table cells you'll need to fork a copy of the magazine template and then add the CSS required to implement these borders to your taste at the end of css-theme.css.

Please let me know if you have any questions about this or anything else

Answered a year ago · Edit answer

Thanks for the advice. We managed to redo the table. I don’t know the code, so it took some time, but I was able to repeat what is in the blogs.

If anyone is interested, my actions.

In the Magazine template. In the css-theme.css file. line 165 - 176

Deleted:

table {
  border-collapse: collapse;
  line-height:1.5;

th {text-align:left}
tr {border-bottom: 1px solid #eee}
thead tr {border-color: #444}
td, th {padding-right: 2rem;padding-left:2rem} 
td:first-child, th:first-child  {padding-left:0}
td:last-child, th:last-child {padding-right:0}  
th, td {padding-top:0.5rem;padding-bottom:0.5rem}
b, strong, h1, h2, h3, h4, h5, h6, th {font-weight:500}

.entry b, .entry strong {font-weight: 600}

And inserted from the blog template: Line 249 - 263

table {
  display: block;
  width: auto;
  overflow: auto;
  word-break: normal;
  word-break: keep-all;
  border-collapse: collapse;
  border-spacing: 0;
  box-sizing: border-box;
  font-size: .9375em;
  line-height: 24px;
}

tr {box-sizing: border-box;border-top: 1px solid {{text_color}};padding: 0}
th, td {box-sizing: border-box;border: 1px solid {{text_color}};padding: 5px 12px 6px}

It seems like I didn’t delete anything unnecessary, it works.

Answered a year ago · Edit answer

Excellent, thank you for sharing your changes – please let me know if anything else comes up

Answered a year ago · Edit answer