Skip to content

When you use [bg right] I want to make <header> come to the right. #492

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

You must be logged in to vote

The header contents inserted by the header directive is a part of slide contents, and it cannot interfere the split image area that was generated by ![bg right](). This behavior is same as Deckset.

If you want to align the header to the right of the slide, don't use ![bg right]() and use a normal inline image ![]() with styling instead. A following Markdown is using gaia theme and aligning the image through float: right.

---
theme: gaia
header: Header contents
---

<style>
header {
 text-align: right;
}
</style>

![](https://marp.app/favicon.png)

# Hello

Your contents are here...

<style scoped>
img:first-of-type {
  float: right;
  width: 50%;
  height: auto;
}
</style>

It's also good …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yhatt
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
2 participants