Hi
Hope you can help.
I added a video to my Shopify Home Page, it looks great on the desktop version, on mobile it doesnt sit well.
Do you know how to fix it? is it through code?
Thanks a lot
https://orsershirts.com/ (its the video in the bottom)
A Shopify store owner is experiencing video display issues on mobile devicesâthe video appears too large or improperly scaled compared to the desktop version. Screenshots reveal significant size discrepancies between desktop and mobile views.
Solution Provided:
<style> tags and adding to theme.liquid before </head> successfully resolved the issueAdditional Discussion:
Alternative approaches mentioned include using responsive CSS (max-width: 100%; height: auto;) or hiring a Shopify developer for comprehensive solutions.
Hi
Hope you can help.
I added a video to my Shopify Home Page, it looks great on the desktop version, on mobile it doesnt sit well.
Do you know how to fix it? is it through code?
Thanks a lot
https://orsershirts.com/ (its the video in the bottom)
Hey @orsershirts ,
What about it do you not like? It looks fine to me. But if thereâs particularly something you want to change, please highlight that (possibly with a screenshot/mockup)
Try looking from pc and youâll see the size difference
I looked from both desktop and mobile, honestly I canât see much of an issue. Maybe you have a different monitor size than I do, could you please post a screenshot of what you are seeing and point out what you donât like about it and how you want it changed.
After several hours, Iâve managed to make significant improvements to the width and height of the video based on the device dimensions. This code will only impact tablets and mobile devices.
Hope you like the result! (Remember to add this code to your theme.css or base.css file):
@media (min-width: 620px) and (max-width: 767px) {
#shopify-section-template--16340303020204__background_video_Kn3CHe {
height: 40%;
}
video.video-js {
position: relative !important;
height: 320px !important;
}
#shopify-section-template--16340303020204__background_video_LHNBRA {
max-height: 325px !important;
}
}
@media (max-width: 619px) {
#shopify-section-template--16340303020204__background_video_Kn3CHe {
height: 30%;
}
video.video-js {
position: relative !important;
height: 200px !important;
}
#shopify-section-template--16340303020204__background_video_LHNBRA {
max-height: 205px !important;
}
}
First of all thank you very very much!!
I added the code to the base.css file and it didnt do anything. And I couldnt find theme.css, do you mean theme.liquid? I placed it there and it also didnt change it.
Thanks again man. really appreciate it.
Thanks for your kind words!
To make the code work, you should add it to your base.css since the code is in CSS format. However, if it didnât work for you, you can add the following code (which is exactly the same, wrapped in ) within the theme.liquid just before this closing tag . You shouldnât have any issues if you place it there!
*I tried to reply on our dm but for some reason I couldnt.
Thank you for the option to give you back bro! You got a coffe on me ![]()
It worked! Thank you so much!
If you dont mind I have another question. Is it possible to add audio to the video on the front page?
Thanks again mate
Youâre welcome, a pleasure! Thanks for the donation! Regarding private messages, for some strange reason, Shopify has disabled this option for meâŚ
Anyway, Iâm glad your code worked! Iâll see if I can add audio to the video you mentioned.
To add audio to your video, you need to upload the video directly with the audio already included and disable the âmutedâ attribute in your HTML code. This code should be in a file with a name similar to âshopify-section-background_video,â ending in â.liquid,â and located within the âsectionsâ section. The code containing the âmutedâ attribute may look like this:
Keep in mind that some browsers block autoplay with sound due to autoplay policy reasons; this is especially common on mobile devices.
Found it. How do I delete it? iâve tried deleting the âmutedâ part but it didnt work.
Hello, can you assist me. Based upon your work here, my question is along the lines of this topic. I have added a video to my website by adding a âCustom Liquidâ section. The video consist of only text and it is shown on both Desktop and Mobile. However, on mobile, the video is extremely small. Can the existing code be modified to make the video larger on Mobile? Here is the code being used (Note that I replace my website with âweb address goes hereâ.
video { width: 100%; height: auto; display: block; margin: 0 auto; }Can you share the URL of your store with me so I can give you the code directly?
Would beyond appreciate this solution! But why is it showing blank?
Hi,
Yes, the video layout on mobile can usually be fixed with a bit of CSS. Most Shopify themes, including Dawn, donât automatically scale videos perfectly for smaller screens. Here are a few ways to adjust it:
Use responsive CSS: You can add something like max-width: 100%; height: auto; to your video element so it scales with the screen.
Adjust section settings: Some themes allow you to set different video sizes or aspect ratios for mobile in the theme editor.
Hire Shopify developer: If youâre not comfortable editing code, a developer (like those from Webkul) can make the video fully responsive for mobile without breaking the desktop layout.
This way, your video will look good on both desktop and mobile.