page allignment center of browser window

briget
briget Community Member Posts: 15
Hi, I would like to locate my course right in the center of the Browser window (like in the example attached).

In Lectory you can choose centre - but the upper course rim is justified at the top of the Browser window. I have learned from Trivantis Support that tehre is no aitomatically function in the tool, but there might be a manual custom JavaScript add on. Can anybody help me with that?

Best regards

Birgit

Comments

  • timk
    timk Community Member Posts: 1,205 ♦ Idol ♦
    Which version of Lectora is it? The pages are in a div, so it's possible to add margin-top to move the page down in the window, either a static value or by subtracting the course height from the window height to center it vertically.

    Only as the page starts at y=0 by default, you'll see it move down, as the margin is added later. And (at least from my perspective) a vertically centered page looks a little uncommon.
  • briget
    briget Community Member Posts: 15
    Hi Tim,

    I'm working with Lectora 17.0.5. Could you please tell me in detail how to add this margin top. My aim is to place the page centered vertically and horizontically - not with a static value, because this should work with different Solutions and devices. Thank you!
  • timk
    timk Community Member Posts: 1,205 ♦ Idol ♦
    Here's a sample. It's all done with the "Run javascript" action on title level.
  • briget
    briget Community Member Posts: 15
    Hi Tim,

    it seems to work - thank you very much!