Jump to content

[Share] Show different Videos on Desktop – Mobile

Recommended Posts

Posted

This apply for Video Block Only. If you want to apply for Section - Video Background, you can follow this instead.

If you can't make it work, you can comment below with link to page where you use Video, I can check easier.

Quote

 

#1. First, you need to add 2 Video Blocks. Something like this

image.png.b5fc4f7adcfda0c3b61c47afef651d8c.png

#2. Install Squarespace ID Finder (free tool)

https://chromewebstore.google.com/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff?hl=en

And find ID of 2 Videos.

In my example, we will have:

  • #block-yui_3_17_2_1_1717495129514_95277
  • #block-yui_3_17_2_1_1718020257422_1351

image.png.0a671acab926533f31d658c9985373fa.png

#3. Use this code to Custom CSS box

/* Hide video on desktop */
@media screen and (min-width:768px) {
  #block-yui_3_17_2_1_1718020257422_1351 {
    display: none;
  }
}
/* Hide video on mobile */
@media screen and (max-width:767px) {
  #block-yui_3_17_2_1_1717495129514_95277 {
    display: none;
  }
}

image.thumb.png.23198508fc8869201739b1de469c9351.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • Replies 2
  • Views 961
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Posted

Thank you for your detailed feedback. This option seem to be the best in my case, but the problem is the Squarespace video upload limit is almost over and I have no more space to add videos directly with Video Blocks. That's why I am using the YT embed option. 

Anyway, I will remember this code in case I need it in the future.

Thank you,  @tuanphan

Posted
1 hour ago, AstonD said:

Thank you for your detailed feedback. This option seem to be the best in my case, but the problem is the Squarespace video upload limit is almost over and I have no more space to add videos directly with Video Blocks. That's why I am using the YT embed option. 

Anyway, I will remember this code in case I need it in the future.

Thank you,  @tuanphan

You can do similar with any blocks/sections, just replace Video Block ID in the code with Embed Block ID, or any block IDs.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.