Forum Discussion

JamesCarson's avatar
JamesCarson
Community Member
16 days ago

Make text on master slide always on top

I have to put a footer at the bottom of all my slides in courseware that was already developed. I put the text in all the master slides, but now I have to go into each layer, in each slide, and make sure no graphics are covering the footer. 

Is there any way to set text on a master slide to ALWAYS be on top, even on top of layers?

What I've been doing is cropping images to show the footer. If there is no way to make text always on top, is there a way to quickly crop an image by entering a number? or do you always have to use the GUI tool?

  • Nedim's avatar
    Nedim
    Community Member

    I don't believe there's a one-click solution in Storyline to ensure that objects on a master slide are always on top. However, you can achieve this by executing a JavaScript trigger on a master slide when the timeline starts:

    document.querySelector('[data-acc-text="footer"]').style.zIndex = "9999";

    This line selects the element with the attribute data-acc-text="footer" and applies a z-index of 9999, effectively bringing it to the front if there are no other higher z-index values on the page.

    • JamesCarson's avatar
      JamesCarson
      Community Member

      Doesn't seem to work with layers on the slide. Either that or I have no idea how to trigger the '[data-acc-text="footer"]' correctly, I named the text box "footer"

      • Nedim's avatar
        Nedim
        Community Member

        Let’s say you have a shape or text on a master slide that you always want to appear on top. Right-click the element, select Accessibility, and enter some Alternative Text—this can be anything you like, just make sure the same text is used in your code. Then, create an Execute JavaScript trigger with the following code:

        document.querySelector('[data-acc-text="footer"]').style.zIndex = "9999";