BaileyConstas Posted September 26, 2022 Share Posted September 26, 2022 Hey all, I'm trying to make a movie script on a website with embedded audio files. As the user is reading the script, they'd click play on a song, and the audio player would stick to the page until it's over. I'd need to do this with multiple (14) audio files. Anyone have code I could use? Thanks so much! Link to comment
Ziggy Posted September 27, 2022 Share Posted September 27, 2022 Hi @BaileyConstas, if you create a section at the top of each script page, and add an audio block, then add this code to the page header code injection, it should stay at the top of the page as you scroll down. <style> .page-section:nth-child(1) > .content-wrapper { padding: 0px !important; min-height:5vh !important; overflow-x:hidden !important; } .page-section:nth-child(1) { position: sticky !important; position: -webkit-sticky !important; top: -2px; z-index: 9999; } </style> You could also achieve it with a sticky sidebar like this: https://www.will-myers.com/articles/create-sticky-sidebar-in-squarespace-classic-editor tuanphan 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com 🔌 Ghost Squarespace Plugins (Referral link)📈 SEO Space (Referral link)⬛ SquareWebsites Plugins (Referral link)☕ Did I help? Buy me a coffee? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment