Jump to content

Floating Spotify playlist

Go to solution Solved by Square_Ace,

Recommended Posts

Posted

Site URL: https://tetra-prism-gblf.squarespace.com/home

Hey everyone, wondering if anyone knows how to embed a Spotify playlist, that then is a floating player (across all sections) in the bottom right hand corner on all pages?

Here is the playlist embeddable code:

<iframe style="border-radius:12px" src="https://open.spotify.com/embed/playlist/1jPEI1ZyAMuA4aLSsAxm8U?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>

Password for website: NewSiteLove

Thank youuu in advanced for any help!!

 

 

Posted (edited)

Hi, I will take a stab at this without actually doing it/testing it.

First, add this custom CSS:

.spotify-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  height: 152px;
  width: ~'clamp(100px,200px,80vw)';
  z-index: 100
}

You can adjust the values as you wish. I've tried to make the width flexible and work across device sizes but you may need to tweak it.

Then go to your code injection footer and paste this:

<div class="spotify-container">
  <iframe style="border-radius:12px" src="https://open.spotify.com/embed/playlist/1jPEI1ZyAMuA4aLSsAxm8U?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
</div>

Hopefully it just magically works :)

Edited by Square_Ace

Square Ace

Enhancing Squarespace websites for over a decade. I am an expert in writing custom code for the Squarespace platform.
Tailor-made, reusable solutions to your problems, whether it's styling, layout or functionality.
Maverick Squarespace Designers, I'll be your Goose. If your tools are holding back your creative vision, maybe I can help.
I also build useful plugins for Squarespace (with some really positive reviews) including the popular high-quality video background plugin.

Posted

@Square_Ace YOU ARE AMAZING!!! It works exactly howww we needed - so appreciate you!! Anyone that may need this - it now has been tested and works thanks to this man lol

 

 

First, add this custom CSS:

.spotify-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  height: 152px;
  width: ~'clamp(100px,200px,80vw)';
  z-index: 100
}

You can adjust the values as you wish. I've tried to make the width flexible and work across device sizes but you may need to tweak it.

Then go to your code injection footer and paste this:

<div class="spotify-container">
  <iframe style="border-radius:12px" src="https://open.spotify.com/embed/playlist/1jPEI1ZyAMuA4aLSsAxm8U?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
</div>
  • Solution
Posted

Glad I could help. Could you mark my answer as the solution please and thank you

Square Ace

Enhancing Squarespace websites for over a decade. I am an expert in writing custom code for the Squarespace platform.
Tailor-made, reusable solutions to your problems, whether it's styling, layout or functionality.
Maverick Squarespace Designers, I'll be your Goose. If your tools are holding back your creative vision, maybe I can help.
I also build useful plugins for Squarespace (with some really positive reviews) including the popular high-quality video background plugin.

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.