Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
One of our blog posts has a YouTube embed. Looks fine on the web, but it looks terrible on mobile since it won't resize to screen width. I've searched around, but none of the suggestions work. You can see the issue on mobile here bit.ly/3jxK76Y
Solved! Go to the solution
This is an accepted solution.
Hello @RitaCh,
Greetings from the Store Watchers Support Team! Happy to help you today.
Go to Online Store -> Actions -> Edit code. Then find theme.liquid.
In your theme.liquid file, please paste the code below before the </head> tag.
<style>
@media only screen and (max-width:768px){
.article-template iframe{
width: 100%!important;
height: 100%!important;
}
}
</style>
Let me know if need further assistance
Regards,
Store Watchers Support Team
See this: https://dev.to/deammer/embed-responsive-youtube-videos-in-2021-5dkh
This is an accepted solution.
Hello @RitaCh,
Greetings from the Store Watchers Support Team! Happy to help you today.
Go to Online Store -> Actions -> Edit code. Then find theme.liquid.
In your theme.liquid file, please paste the code below before the </head> tag.
<style>
@media only screen and (max-width:768px){
.article-template iframe{
width: 100%!important;
height: 100%!important;
}
}
</style>
Let me know if need further assistance
Regards,
Store Watchers Support Team
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025