Jump to content

Possible to customize youtube embed to fit the size of entire mobile container (no pad)?

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Should be possible with some custom CSS like this:


@media only screen and (max-width: 960px) {
       .video-block {
           width: 99vw;
           padding: 0 !important;
       }

       .pageWrapper {
           margin-left: 0 !important;
           margin-right: 0 !important;
       }
}

That will remove the margin/padding from both the video block and the page wrapper, and set the video block to nearly the full width (I noticed that 100vw seemed to go beyond the screen width). You can also adjusted the rule's dimensions to accommodate larger screens like iPads and desktops if you want.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.