Jump to content

Embed Video Not Resizing For Mobile View

Recommended Posts

Site URL: https://surfingmarocco.squarespace.com/

Hi there,

I see this was a problem on March 3, 2022 also, but fixed without an answer appearing on the forum!

So I have several videos on the page (using <> code from youtube) and none of them fit into the cell phone width. Please could someone help... perhaps I can just edit the squarespace code but I don't know what it should be changed to sorry! I've fiddled with the settings for the page width to no avail.

Thank you, happy weekend!

Jan

Screenshot_20220408-130543_Chrome.jpg

Link to comment

I think the site is password protected, However the solution to this problem is 

Add two video, One for desktop: 16:9 ratio
Other for mobile: 4:3 ratio,

Now hide Desktop Video on Mobile and Vice versa.
// To hide the Desktop Video on mobile
#ID {
display: none !important;
}
// To hide the mobile Video on Desktop
@media only screen and (max-width: 449px) {
#ID {
display: none !important;
}
}

Inspect the Element to find the id and replace it with ID in the code.

Become a contributor to the largest resource for Squarespace and gain recognition from thousands of visitors.

Join us on this exciting journey. Ping us here!.

Link to comment
On 4/9/2022 at 12:07 AM, janmorgan said:

Site URL: https://surfingmarocco.squarespace.com/

Hi there,

I see this was a problem on March 3, 2022 also, but fixed without an answer appearing on the forum!

So I have several videos on the page (using <> code from youtube) and none of them fit into the cell phone width. Please could someone help... perhaps I can just edit the squarespace code but I don't know what it should be changed to sorry! I've fiddled with the settings for the page width to no avail.

Thank you, happy weekend!

Jan

Screenshot_20220408-130543_Chrome.jpg

Try adding this to Design > Custom CSS

/* Mobile Youtube */
@media screen and (max-width:767px) {
	iframe[src*="youtube"] {
		width: 100% !important;
}
}

 

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!)

Link to comment
  • 1 month later...
On 4/11/2022 at 1:23 AM, tuanphan said:

Try adding this to Design > Custom CSS

/* Mobile Youtube */
@media screen and (max-width:767px) {
	iframe[src*="youtube"] {
		width: 100% !important;
}
}

 

This worked for me! However, I'm still having the same issue with a Google Forms Survey embedded just below my Youtube Video. Now, the video is within the confines, but the survey still extends past. Any advice? Thank you!!!

IMG_650F6AABF972-1.jpeg

Edited by bouleverser
Link to comment
On 5/30/2022 at 6:03 PM, bouleverser said:

This worked for me! However, I'm still having the same issue with a Google Forms Survey embedded just below my Youtube Video. Now, the video is within the confines, but the survey still extends past. Any advice? Thank you!!!

IMG_650F6AABF972-1.jpeg

Can you share link to page where you use Google Form?

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!)

Link to comment
  • 4 months later...
  • 1 year later...

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.