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.
Check Theme Settings: Start by checking if Dawn provides any built-in options for adjusting video width in its theme settings or customization panel. Themes often have specific settings for controlling media display.
Custom CSS: If there are no built-in options, you can use custom CSS to override the default width. Go to your WordPress dashboard, navigate to Appearance > Customize > Additional CSS, and add the following code:
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024