Is it possible to have a table in the center in Github gist markdown?

后端 未结 3 1517
长发绾君心
长发绾君心 2021-01-04 04:18

Is it possible to have a table in the center in Github gist markdown? If so, how?

I\'ve used the following syntax to create a table on a markdown fi

3条回答
  •  花落未央
    2021-01-04 04:42

    In short, it's not possible. GitHub does not allow you to define your own styling.

    First, note that there is no mention of the ability to apply any styling to any block level types in the GitHub Flavored Markdown spec (see the tables section). As your examples show, you are aware that you can center text within table cells, but that only applies to the cells and has no effect on the parent table (which is how HTML and CSS work and is not specific to Markdown or GitHub).

    There are a few ways to define custom styles for HTML (which Markdown generates), but GitHub does not permit them.

    One such way is to define CSS rules. However, right in the spec, GitHub explicitly states that they do not allow