How to place a image in center? #430
-
I want to place a image centered. So I tried the following code in the particular slide page:
But the result I got is not centered. I screenshot this page, so please ignore the black border. Is there something I set wrong? I'am using marp in vs code. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I see here https://github.com/orgs/marp-team/discussions/283#discussioncomment-2393104. It said that only
Also didn't work. I also changed the element |
Beta Was this translation helpful? Give feedback.
-
![](./img/maze.png) This Markdown renders a following HTML: <p>
<img src="./img/maze.png" />
</p>
<style scoped>
p { text-align: center; }
</style> See also https://marp.app/blog/the-story-of-marp-next#image for more flexible way. It can define |
Beta Was this translation helpful? Give feedback.
This Markdown renders a following HTML:
<p>
tag (paragraph) is aligning its contents to left (text-align: left
). Thus, using a following style can align contents into center.See also https://marp.app/blog/the-story-of-marp-next#image for more flexible way. It can define
center
keyword for the image. (WARNING: This way is abusing an alternative text of the image)