Shopify themes, liquid, logos, and UX
Hi there,
We switched to using Dawn recently. With our previous theme, YouTube or Vimeo videos in blog posts were the full column width when viewed on the website, but now they are only about 80% of the width:
Is there a way to make them full width by default in the theme editor?
Solved! Go to the solution
This is an accepted solution.
Hi @ArtMag ,
Videos were added using iframe. Go to your Code editor. Go to Themes > Actions > Edit code. Find the Asset folder and open the base.css. Then add the code below.
NOTE: This will adjust all your iframe videos matching the width of the section.
iframe {
width: 100% !important;
}
If this helped you, please select as a solution. Thank you
This is an accepted solution.
Hi @ArtMag ,
Videos were added using iframe. Go to your Code editor. Go to Themes > Actions > Edit code. Find the Asset folder and open the base.css. Then add the code below.
NOTE: This will adjust all your iframe videos matching the width of the section.
iframe {
width: 100% !important;
}
If this helped you, please select as a solution. Thank you
Worked perfectly, thank you so much, and I love your YouTube videos and website for all the Shopify tips and tricks you share! 💜
Hi @ArtMag ,
Thank you
To make videos in blog posts full-width, follow these steps:
Identify the video element in your blog post. This can be a YouTube or Vimeo embed code or a self-hosted video file.Wrap the video element in a container with a class name. For example, you can use a <div> element with a class name "video-container".Apply CSS to the container to make the video full-width. Here's an example:
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; } .video-container iframe, .video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
This CSS uses the "padding-bottom" trick to make the video responsive and full-width. The padding-bottom value is set to 56.25%, which is the aspect ratio of a 16:9 video. You can adjust this value based on the aspect ratio of your video.
Save the changes to your blog post and preview the page to ensure the video is now full-width.
To make videos in blog posts full-width in Shopify, you can follow these steps:
Note: The exact steps and options may vary depending on your Shopify theme. If your theme does not provide a built-in full-width video option, you may need to customize your theme's code or consider using a Shopify app or plugin specifically designed for full-width video integration.
Remember to always preview and test your changes across different devices and screen sizes to ensure the video displays properly and maintains responsiveness.
User | RANK |
---|---|
153 | |
127 | |
80 | |
73 | |
66 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023