Adding space between text and image in Markdown

21.2k views Asked by At

In Markdown, you add an image as

![myimg](link)

Now, I can easily change the size and placement of said image using attributes as

![myimg](link){: height="75px" width="300px" align="left"}

How do I also make it so that there is also a (choosable) space between image and text? Parameters like border don't work.

Using Kramdown as converter, on Github pages, if that matters.

2

There are 2 answers

0
Tamás Sengel On BEST ANSWER

Markdown is not capable of designing layouts like this. You can use multiple non-breaking spaces ( ) to adjust the spacing between an image and text.

Example:

![image](link)    text

Result:

    text

0
MethodMan On

For this to work for me for the paragraph of text next to the image, I used this:

![myimg](link){: height="75px" width="300px" style="float:left; padding-right:10px" }