Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have resized the video, but it shifts to the left. I am trying to center the video. Custom Liquid is as follows:
<video class="video-background" loop="" muted="" no-controls="" autoplay="" src="https://cdn.shopify.com/videos/c/o/v/b905c805b3914090b6a2a301b5a347b2.mp4?v=1648681029" playsinline="" style="transform: scale(1.0, 1.0);">
<source type="video/mp4" src="">
</source></video>
<style>
.video-background {
width: 60%;
padding-top: 0px;
opacity: 1.0;
height: 100%;
left: 0;
top: 0;
<center>}
</style>
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Hi @bennyccox,
Please change all code:
<video class="video-background" loop="" muted="" no-controls="" autoplay="" src="https://cdn.shopify.com/videos/c/o/v/b905c805b3914090b6a2a301b5a347b2.mp4?v=1648681029" playsinline="" style="transform: scale(1.0, 1.0);">
<source type="video/mp4" src="">
</source></video>
<style>
.section-{{ section.id }}-padding {
text-align: center;
}
.video-background {
width: 60%;
padding-top: 0px;
opacity: 1.0;
height: 100%;
left: 0;
top: 0;
}
</style>
it will display fine
out of all the solutions, this is the only one that worked for me in dawn 10 when inserting custom liquid, thank you!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025