Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change font in Github Flavored markdown for Table

I am creating a Wiki page in github.com. I am trying to use table in the Markdown edit mode. I created table by embedding html expecting to add inline-css later but found that inline-css also not working.

I tried following:

<style>   .markdown-body table td {     font-size: 12px !important;   } </style> 

Link for my wiki page.

Have anyone tried it before or achieved similar things or any help?

like image 954
brg Avatar asked Oct 27 '14 09:10

brg


People also ask

How do I change font size in markdown?

To change the font size, you don't need to know a lot of html for this. Open the html output with notepad ++. Control F search for "font-size". You should see a section with font sizes for the headers (h1, h2, h3,...).

What GitHub Flavored Markdown is and how it is used?

GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown that is currently supported for user content on GitHub.com and GitHub Enterprise. This formal specification, based on the CommonMark Spec, defines the syntax and semantics of this dialect. GFM is a strict superset of CommonMark.

How do I add a table to a readme in GitHub?

You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe | .


2 Answers

I have managed to make the font size small in table by using <sub>...</sub> tag.

Achieved this by Wrapping each line of text (inside td) under <sub>...</sub>.

UPDATED WIKI LINK

like image 91
brg Avatar answered Sep 20 '22 14:09

brg


Just because I don't see this mentioned here I'd like to add one interesting possibility. I know that GitHub's markdown is easy, but if you get at this point where you are sort of battling with it's limitations to get the styling just the way you like it, you might consider switching over to GitHub Pages.

From that link:

GitHub Pages are public webpages hosted and published through our site.

You can create and publish GitHub Pages online using the Automatic Page Generator.

GitHub has special handling for a branch in your repo called gh_pages. Any content pushed to that branch will be published to a subdomain on github.io. Once done, your very own static website will appear at https://your-username.github.io/your-project.

Github makes it super easy to convert your existing markdown to some nice looking website (check out the Automatic Page Creator section in the repo settings) which you can then just pull in from the gh_pages branch and edit to your heart's content.

like image 33
Stijn de Witt Avatar answered Sep 20 '22 14:09

Stijn de Witt