Using Markdown, how do I center an image and its caption?

前端 未结 7 803
小鲜肉
小鲜肉 2021-01-31 08:08

I want to end up with:

Hello there!

      
      This is an image

Hi!

Where the image and the text This is an image

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 08:31

    With kramdown (used by githubpages)

    {: style="text-align:center"}
    That is, while there is value in the items on
    the right, we value the items on the left more.
    

    Or using the response from @(Steven Penny)

    {:.mycenter}
    That is, while there is value in the items on
    the right, we value the items on the left more.
    
    
    

提交回复
热议问题