Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll kramdown how to center text

I am using Jekyll (kramdown), and want to make some text align center.

I found <span style=""> works for font color and size, but not work for text-align.

How can I align some text.

I have tried:

<span style="color:gray; font-size: 80%; text-align: center;">Test Text</span>

And:

-> Test Text <-

None of them work.

like image 511
vancexu Avatar asked Feb 03 '15 09:02

vancexu


1 Answers

Try using kramdown block attributes kramdown block attributes :

Test text
{: style="color:gray; font-size: 80%; text-align: center;"}
like image 199
David Jacquel Avatar answered Oct 07 '22 23:10

David Jacquel