I am using quarto presentations with revealjs
format.
I have no problem setting images to be horizontally centered like so
![](img/path_to_img.svg){fig-align="center" height="200"}
I am trying to get the figure vertically aligned to center but I can't find a way to.
If I try to tweak the css of the slide by changing the class to .center
, it does center the content vertically, but it centers all content and not just the image.
How do I vertically center the image?
Things I have tried:
- adding
style="padding-top: 150px;
helps to kinda center it, but it's eye-balling - adding
vertical-align: middle;
does not seem to work
padding-top
, I wonder why this is the most straight-forward solution from quarto docs rather than having a proper middle alignment (it's probably because I don't understand what's going on in the background enough). – Boanerges