How do I right-align an image in a GitBook?

3.6k Views Asked by At

I am working on a GitBook using the web-based editor at www.gitbook.com. I would like to have an inline image that is right justified. If doing this in HTML, an example would be:

<img src="..." align="right">

I've been able to center an image with "center" tags, but haven't been able to do anything else to them. Any align or style attributes get stripped from the image in the preview pane. I've read the markdown guide, and searched Google and Stackoverflow with no luck.

Is it possible to control image alignment via markdown or HTML in a GitBook via the web-based editor?

1

There are 1 best solutions below

3
On

As far as I know it is not possible to control image alignment via markdown (or at least via the markdown the gitbook uses).

However it is possible via HTML. You need to write it like in your example

<img src="..." align="right">

With this you can easily align images or change the size. You only need to ignore the Markdown syntax for this kind of images and use only the HTML syntax