Jump to content

Making video full width in project page gallery

Recommended Posts

Site URL: https://www.erobertson.design/

I am struggling to add Vimeo videos to my project page gallery.

I would like them to be full-width, lining with my images, but the iFrame won't fill the page width. The video ends up with a margin either side.

This is the embed code I am currently using:

<div class="video-responsive">
  <iframe allow="autoplay; fullscreen" allowfullscreen src="https://player.vimeo.com/video/[INSERT-VIDEO-CODE]?wmode=opaque" width="100%" frameborder="0"></iframe>
</div>

I'm not currently using a video thumbnail. When I use a video thumbnail, the thumbnail fills the page width, but the video still doesn't.

I am using the Jasper template.

Can anyone help?

Link to comment
  • Replies 8
  • Views 3.3k
  • Created
  • Last Reply

There is a video at the bottom of this page, where you can see the issue:

https://www.erobertson.design/churchofsnails

I'm now using this embed code:

<div class="video-responsive">
<iframe mozallowfullscreen allowfullscreen src="https://player.vimeo.com/video/[INSERT-VIDEO-CODE]?autoplay=1&amp;loop=1&amp;autopause=0&amp;muted=1&amp;wmode=opaque" width="100%" !important webkitallowfullscreen frameborder="0" id="vimeo_player" muted></iframe>
</div>

Link to comment
1 minute ago, e_robertson said:

@tuanphan Do you have any suggestions? I'm going to take the video down if I can't find a solution.

Your page is not fullwidth, difficult to handle

Add to Home > Design > Custom CSS

/* Set full width all elements */
.collection-type-project #page {
    padding-left: 0;
    padding-right: 0;
}
/* set fullwidth iframe video */
.collection-type-project .intrinsic-inner {
    padding-bottom: 67% !important;
}
/* remove padding bottom */
.project-slide.project-slide-has-no-description.project-slide-landscape {
    padding-bottom: 0 !important;
    margin-bottom: 0;
}

 

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

You beat me to it 🙂.  I was just about to say the same, although being specific about the video wrapper rather than the collection. The other lines shouldn't be necessary; it should work at all widths.

.sqs-video-wrapper .intrinsic .intrinsic-inner {
  padding-bottom: 66.5%!important;
}

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 8 months later...

I'm currently having the same issue. 

So far, I'm using this for my video embed code:


<div class="video-responsive">
<iframe mozallowfullscreen allowfullscreen src="https://player.vimeo.com/video/[INSERT-VIDEO-CODE]?autoplay=1&amp;loop=1&amp;autopause=0&amp;muted=1&amp;wmode=opaque" width="100%" !important webkitallowfullscreen frameborder="0" id="vimeo_player" muted></iframe>
</div>

 

And, this code under Home > Design > Custom CSS:

.sqs-video-wrapper .intrinsic .intrinsic-inner {
  padding-bottom: 66.5%!important;
}

If you go to this page: https://www.tlloydsgn.com/portfolio-1/project-two-bm35w-msw4h

You can see the video at the top doesn't fill the page width and match up with the image gallery below. And I should note this happens while I'm viewing on my large desktop monitor. 

Any thoughts as to why this may be?

Link to comment
On 1/22/2021 at 11:07 AM, tlloydsgn said:

I'm currently having the same issue. 

So far, I'm using this for my video embed code:


<div class="video-responsive">
<iframe mozallowfullscreen allowfullscreen src="https://player.vimeo.com/video/[INSERT-VIDEO-CODE]?autoplay=1&amp;loop=1&amp;autopause=0&amp;muted=1&amp;wmode=opaque" width="100%" !important webkitallowfullscreen frameborder="0" id="vimeo_player" muted></iframe>
</div>

 

And, this code under Home > Design > Custom CSS:


.sqs-video-wrapper .intrinsic .intrinsic-inner {
  padding-bottom: 66.5%!important;
}

If you go to this page: https://www.tlloydsgn.com/portfolio-1/project-two-bm35w-msw4h

You can see the video at the top doesn't fill the page width and match up with the image gallery below. And I should note this happens while I'm viewing on my large desktop monitor. 

Any thoughts as to why this may be?

Add to Design > Custom CSS

/* Fullwidth video */
[data-section-id="600a0b3da5a872396bed48b6"] .content-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !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

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.