Making Jekyll img's wider than the text?

后端 未结 3 855
别跟我提以往
别跟我提以往 2021-01-24 00:30

For my Jekyll blog, I want the images to span the whole width of the column, while having padding on either side of the text, like this: http://www.webdesignerdepot.com/2015/05/

3条回答
  •  不知归路
    2021-01-24 00:51

    I understand that you are writing your post/page in markdown.

    In order to apply a specific style to the P container you can use kramdown block attributes to set a class on it.

    Some test
    
    ![Alt text](/path/to/img.jpg)
    {: .imgContainer}
    

    Will render as

    Some test

    Alt text

    You can then style .imgContainer.

提交回复
热议问题