Skip to content

How to align image bellow text header in Marp or Marpit #167

Answered by yhatt
wakatana asked this question in Q&A
Discussion options

You must be logged in to vote

Don't use "bg" keyword in an image. It is only for slide background. Use a standard Markdown inline image for layout, with a bit of styles.

## Heading

![h:480](https://csgeekshub.com/wp-content/uploads/2020/07/C-Program-compilation-steps-and-process.jpg)

<style scoped>
/* Styling for centering (required in default theme) */
h2, p {
  text-align: center;
}
</style>

Recommend to set an image height through h:xxx, to prevent sticking out from the edge of slide.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wakatana
Comment options

@yhatt
Comment options

@Juanvvc
Comment options

Answer selected by yhatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants