0

I'm using the even theme in hugo with Markdown. What would be the best way to make a full width table in a post ?

Let's say we have the following content:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur.

| ads | asdf  |
|:----|:------|
| 123 | 3     |
| 123 | 2314  |
| 123 | 61346 |

Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae
ab illo inventore veritatis et quasi architecto

How would I make the table take up the full width of the page while the rest remains as usual ?

Martin Gergov
  • 1,556
  • 4
  • 20
  • 29
  • 1
    1. Check the theme docs. 2. If no solution on docs: 3. Check the dom element in the browser inspector. See what CSS is being applied. 4. Check what CSS style sheet is being applied. 5. Add the needed CSS. 6. Do pull to theme for author to review and update. – Rogelio Nov 15 '21 at 17:52
  • fair point. I was looking for something builtin that is available for hugo but I guess I'll have to make it myself. thanks. – Martin Gergov Nov 15 '21 at 19:42
  • No worries, and I understand where you were coming from, seeing if their was a "hugo" way or something of that nature. In this case, not that I know of, and do remember - Hugo -> Goldmark -> markdown - i.e. Hugo doesn't render the markdown - Goldmark does. So even in this case, the question would be "What are the docs on Hugo's implementation of Goldmark in relation to tables" – Rogelio Nov 16 '21 at 19:19

1 Answers1

0

The answer is simple, use a simple extra CSS rule for this:

table {width: 100%;}
Mr. Hugo
  • 11,887
  • 3
  • 42
  • 60