All things Shopify and commerce
Hello! I am using the Dawn theme and have a video banner that I used custom coding to create on a loop. I would like to make the width and height smaller as to not take up the whole screen. My website is www.platinumlabelhair.com
Here is the coding:
<style>
video {
width: 80%;
height: 40;
display: block;
margin: 0 auto;
}
</style>
<video muted autoplay playsinline loop>
<source src="https://cdn.shopify.com/videos/c/o/v/912356a9dbdd437fb7b23230e088033e.mp4"
type="video/mp4">
<source src="https://cdn.shopify.com/videos/c/o/v/14aabe251d3f4a0c8acbc758ef546e9b.mp4"
type="video/mp4">
</video>
This is Ellie from BOGOS (formally Free Gifts by Secomapp), # 1 Promotion App on Shopify featuring Free Gift, Discounts & Bundles
To change the video banner size, you just need to adjust the width and height percentages to be smaller. For example:
width: 60%;
height: 40%;
If my answer is helpful, I would appreciate it if you could give me a Like or accept it as a Solution! 😁
Wish you all the best with the business,
Ellie
BOGOS (formally Free Gifts by Secomapp)
Hello @platinumlabel
you need like this
Hello @platinumlabel
replace your code with this correct code
video {
display: block;
max-height: 748px;
margin: 0px auto;
}
here is one more modified code u can use this if first one is not working
here is the code
video {
display: block;
max-height: 650px;
object-fit: none;
width: 80%;
margin: 0 auto;
}
thanks
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024