Quinten
Quinten

Reputation: 41265

Center slide header in middle of revealjs Quarto

I would like to center a slides header in the middle of the slide. It should actually look the same as in the title slide. I tried using {.center}, but that only centers vertically and not horizontally. Here is some reproducible code:

---
title: "Center slide in middle"
format: revealjs
---

## Slide {.center}

Output:

enter image description here

As you can see it is vertically centered but not horizontally. So I was wondering if anyone knows how to center the slide header in the middle of a slide in revealjs Quarto?

Upvotes: 1

Views: 2332

Answers (1)

Shafee
Shafee

Reputation: 19897

---
title: "Center slide in middle"
format: revealjs
engine: knitr
---


## Slide {.center}

```{css}
.center h2 {
  text-align: center;
}
```

slide header centered

Upvotes: 6

Related Questions