Search code examples
htmlcssrmarkdownreveal.js

How to change the position of the whole text (title, headers and body) in reveal.js to top left?


I have a presentation using reveal.js and the text (title, body, etc.) change position every time I change slide.

Is there a way to fix text and title to be top left (so that at least the title stays in place?)

In the following image, you can see that the title is shifting down from one slide to the next (use the search box" as a reference).

enter image description here enter image description here


Solution

  • I believe you have your YAML header setup incorrectly if you are not getting the expected behaviour.

    ---
    output:
      revealjs::revealjs_presentation:
        center: true
    ---
    

    The center: true entry is for vertical positioning according to the reveal.js configuration (link).

    // Vertical centering of slides
    center: true