Forum Discussion
Make text on master slide always on top
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.
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"
- Nedim16 days agoCommunity 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";
- JamesCarson16 days agoCommunity Member
OK tried that too, but still doesn't work. Looks like the layers are on top and not the footer.
- Nedim16 days agoCommunity Member
Layers work a bit differently. They use the Feedback Master layout not the Slide Master layout, so any objects on layers will always appear on top of the base layer by default.
If you want a footer (or any other element) to stay on top of both the base layer and any slide layers, you’ll need to add it to the Feedback Master slide (normally "Blank" layout), as well and target it again with JavaScript to assign it a higher z-index value.
In this example, the footer element is positioned on top of the gray background shape on both the base layer and other layers. Attached is the Storyline file used in this example.