Shopify themes, liquid, logos, and UX
Hello,
I am trying to change the video height on desktop.
https://obadiahcoffee.com/pages/holiday-shop
My current HTML custom liquid code:
<style>
video {
width: 90%;
height: auto;
display: block;
margin: 0 auto;
}
</style>
<video muted autoplay playsinline loop>
<source src="https://cdn.shopify.com/videos/c/o/v/b3a780f32b42440eb295bd733787b541.mov">
<source src="https://cdn.shopify.com/videos/c/o/v/b3a780f32b42440eb295bd733787b541.mov">
</video>
Solved! Go to the solution
This is an accepted solution.
Replace the above CSS with this CSS:
<style>
video {
width: 90%;
height: 800px !important;
display: block;
margin: 0 auto;
object-fit: cover;
}
@media(max-width:768px){
video {
height: 300px !important;
}
}
</style>
If you need any assistance I can help feel free to ask or check your Info email:
I hope this solution works for you!
If it does, please Like It and Mark It As A Solution, or support me by Buying Me A Coffee to keep me going!
-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR
-If you need an expert Shopify developer for customization and development, feel free to contact me.
Email: Mehran.ali5300@gmail.com
WhatsApp: +92 343 0211536
Hi @andrew72
You can try adding this CSS
<style>
video {
width: 90%;
height: 500px !important;
display: block;
margin: 0 auto;
object-fit: cover;
}
</style>
Note: the above CSS will reduce the size but the video with be cropped don't forget the adjust the height according to your need
I hope this solution works for you!
If it does, please Like It and Mark It As A Solution, or support me by Buying Me A Coffee to keep me going!
-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR
-If you need an expert Shopify developer for customization and development, feel free to contact me.
Email: Mehran.ali5300@gmail.com
WhatsApp: +92 343 0211536
Yes you can use CSS Media Query for that if you can specify the Heighjt for mobile and desktop I can write the Query for you
-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR
-If you need an expert Shopify developer for customization and development, feel free to contact me.
Email: Mehran.ali5300@gmail.com
WhatsApp: +92 343 0211536
Hi @Mehran_Ali,
I wanted these settings for desktop:
width: 65%;
height: 800px
And these for mobile:
width: 90%;
height: 300px
Thanks for your help.
This is an accepted solution.
Replace the above CSS with this CSS:
<style>
video {
width: 90%;
height: 800px !important;
display: block;
margin: 0 auto;
object-fit: cover;
}
@media(max-width:768px){
video {
height: 300px !important;
}
}
</style>
If you need any assistance I can help feel free to ask or check your Info email:
I hope this solution works for you!
If it does, please Like It and Mark It As A Solution, or support me by Buying Me A Coffee to keep me going!
-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR
-If you need an expert Shopify developer for customization and development, feel free to contact me.
Email: Mehran.ali5300@gmail.com
WhatsApp: +92 343 0211536
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024