revealJS slides size in web browser - layout #12281
Replies: 6 comments 4 replies
-
Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? The goal is to make it as easy as possible for us to recreate your problem so that we can fix it: please help us help you! Thanks. You might want to opt-out of auto-stretch. You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository.
Additionally and if not already given, please share the output of |
Beta Was this translation helpful? Give feedback.
-
reproducible example below ---
title: XXX
format:
unhcr-revealjs:
width: 1280
height: 720
slide-number: true
slide-layout: auto-stretch
show-slide-number: print
pdf-separate-fragments: true
embed-resources: true
editor: visual
---
## design
::: panel-tabset
### 2025
:::: columns
::: {.column width="80%"}
#### plots
```{r}
#| fig-height: 3.6
#| fig-width: 10
library(ggplot2)
pl1<- ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point(color = "blue", size = 3) +
geom_smooth(method = "lm", color = "red", se = FALSE) +
labs(
title = "Relationship between Weight and MPG",
x = "Weight (1000 lbs)",
y = "Miles per Gallon"
) +
theme_minimal()
pl1
```
```{r}
#| fig-height: 3.6
#| fig-width: 10
pl1
```
:::
::: {.column width="20%"}
#### text
<br><br><br><br><br><br>
some text
:::
::::
### 2024
```{r}
#| fig-height: 3.6
#| fig-width: 10
pl1
```
```{r}
#| fig-height: 3.6
#| fig-width: 10
pl1
```
::: if I use my browser on only 50% of my screen width it looks like below but if I use in full width, it does not resize. |
Beta Was this translation helpful? Give feedback.
-
I am attaching my css |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
thank you
not ideal but it does the job for now. Ideally I would like to have a dynamic resizing adjusting the slide size and content to the screen size (like we have for smartphones) |
Beta Was this translation helpful? Give feedback.
-
ok. I will contact them and get back to you if I find a fix. thank you for your support |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hello

I created a slide deck with revealJS
I have problems with the width/height and how the slides appear in the web browser. it varies between screens, computers and also using the same screen when resizing the browser tab.
for example, below the slide is off and half of the second plot is cutt
I used
but if I resize my browser (half of my screen width), it will look nice
in yaml, I have this
any ways to make sure the content always shows up regardless of screen or brower width? and consistent across all slides?
THANK YOU!
Beta Was this translation helpful? Give feedback.
All reactions