0

I am trying to build a simple website using Quarto and I would like to know how to use html within the Quarto.

I would like to create a page which is divided in two equal parts. On the left there would be only .gif element as a background. On the right, there would be a text with a button below which could be used as a link.

I try to use the following code in index.qmd file but it doesn't work.

---
title: ""
---
---
format: html
---
<body style="margin: 0; padding: 0; display: flex; height: 100vh;">
<div style="flex: 1; background: url('gif_example.gif') no-repeat center center; background-size: cover;">
</div>
    
<div style="flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<p>To jest napis na prawej stronie</p>
<button>Przycisk</button>
</div>
</body>

I am using Rstudio

1 Answer 1

0

Use it like this:

---
title: ""
format: html
---

<body style="margin: 0; padding: 0; display: flex; height: 100vh;">
<div style="flex: 1; background: url('gif_example.gif') no-repeat center center; background-size: cover;">
</div>
    
<div style="flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<p>To jest napis na prawej stronie</p>
<button>Przycisk</button>
</div>
</body>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.