Search code examples
markdowngithub-flavored-markdownapiblueprintapiary.io

Is it possible to center tables in a markdown file?


I have a table:

    | This | Is | A | Table |
    | :--- | -- | - | ----: |
    | foo  | ba | r | elbaT |

I'd like the table to display in the center of my Markdown file instead of left-aligned. I am not trying to align text, but the entire table itself. Do I need to resort to HTML/CSS to achieve what I want?

This is for an Apiary.io project.


Solution

  • My solution detailed by Gaffney in an Apiary.io issue comment.

    Basically I add custom stylesheets and scripts within apiary.apib HTML blocks to style the page with HTML instead of headwalling that a Markdown dialect isn't CSS.

    Also "How to Center Anything in CSS".