Center image/figure in post #1514
-
|
Hi, How would I go about centering a figure/image or video in a markdown blog post? Edit: I managed to center my image by adding: to my figure.html, and center=true in my image reference. But is there a better way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
You can do something like this when including an image. Using markdown and adding custom classes: {:style="margin:auto; display:block;"}Or if you are using the {% include figure.html path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %}You could also extend the |
Beta Was this translation helpful? Give feedback.
You can do something like this when including an image. Using markdown and adding custom classes:
Or if you are using the
figure.htmlcode from the repo, currently you can add your own classes to it.{% include figure.html path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %}You could also extend the
figure.htmlto add support for custom styles like you did. I think yours is a good solution.