Jump to content

Help! Remove padding of video box when resizing browser

Go to solution Solved by melody495,

Recommended Posts

Hi there,

i'm struggling trying to get my video to completely fill its 'box' at all times no matter what browser size.
It wants to always hold its exact ratio, so it appears that the top and bottom have large padding, which is what I don't want.

I would like the video to fill its space completely, in order to always match the height of the picture next to it. I hope this makes sense! any help would be greatly appreciated! 

My website is chloeramli.com !! I've inserted a picture of the bottom padding I would like to remove for both videos in my landing page, please help

Screenshot 2023-11-04 at 21.31.37.png

Edited by bibo0903
Add tags
Link to comment
  • Replies 7
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

Hi, if your video doesn't keep its aspect ratio, it will look distorted, which is probably not what you want to achieve.

Since your video is wider than it's tall, the limiting factor is going to be the width. If you want to have it the same height as another image, then your video could go off screen or overlap what's to its right. 

In editing mode, if your video block isn't already the same height of your image, do that first and see how it behaves, and if that does what you want it to do. 

Let me know how it goes. 

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Website Developer
e: melody@melodylee.tech


💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
 Did I help? I like coffee (Thank you)
🧰 See the tools I use (contain affiliate links)


 

Link to comment
13 hours ago, melody495 said:

Hi, if your video doesn't keep its aspect ratio, it will look distorted, which is probably not what you want to achieve.

Since your video is wider than it's tall, the limiting factor is going to be the width. If you want to have it the same height as another image, then your video could go off screen or overlap what's to its right. 

In editing mode, if your video block isn't already the same height of your image, do that first and see how it behaves, and if that does what you want it to do. 

Let me know how it goes. 

 

I saw another topic and a member was able to fix this problem with the code down below though.. the code hasn't worked for me but I think its a step closer to the right direction. My video is already the same height of the image supposedly as well and it still behaves weirdly

section[data-section-id="651597d004d0441072b29cc5"] .sqs-block-video {
    .sqs-block-content, .intrinsic, .embed-block-wrapper, .sqs-native-video  {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        padding: 0 !important;
    }
    .video-player {
    	padding: 0 !important;
    	video {
    		object-fit: cover !important;
    	}

    }
}
Link to comment

Hi, please share a link to your website so can check

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Website Developer
e: melody@melodylee.tech


💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
 Did I help? I like coffee (Thank you)
🧰 See the tools I use (contain affiliate links)


 

Link to comment
  • Solution
On 11/5/2023 at 7:39 AM, bibo0903 said:

 

I saw another topic and a member was able to fix this problem with the code down below though.. the code hasn't worked for me but I think its a step closer to the right direction. My video is already the same height of the image supposedly as well and it still behaves weirdly

section[data-section-id="651597d004d0441072b29cc5"] .sqs-block-video {
    .sqs-block-content, .intrinsic, .embed-block-wrapper, .sqs-native-video  {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        padding: 0 !important;
    }
    .video-player {
    	padding: 0 !important;
    	video {
    		object-fit: cover !important;
    	}

    }
}

Hi, this code is not making anything changes for your videos because the data-section-id does not exist on your webpage. That is unique, so you need to change it to the id for your section.

change the first line to this and see?

section[data-section-id="65432b8278396716f29e57a8"] .sqs-block-video {

Beware the code will crop your video. Because your video is already at full width.

 

On 11/4/2023 at 2:16 PM, bibo0903 said:

I would like the video to fill its space completely, in order to always match the height of the picture next to it. I hope this makes sense! any help would be greatly appreciated! 

Back to your original question though. I don't see any images next to that video, can you please clarify?

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Website Developer
e: melody@melodylee.tech


💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
 Did I help? I like coffee (Thank you)
🧰 See the tools I use (contain affiliate links)


 

Link to comment
  • 2 weeks later...
3 hours ago, bibo0903 said:

Thank you so much!!!! It works!

out of curiosity where did you get the data id? 

You are very welcome 🙂

You can download an extension called SquareSpace ID Finder. Please see below 🙂

 

 

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Website Developer
e: melody@melodylee.tech


💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
 Did I help? I like coffee (Thank you)
🧰 See the tools I use (contain affiliate links)


 

Link to comment

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.