So for my product page I have a lot of Videos on YouTube that Id like to add for a sales tool. I can seem to figure out what code I need to target to take away the black border and have the YouTube video match the same size as my cover image. Is there anyone out that could help me out? The theme is Warehouse if that is helpful at all. And here is the link to the Product page so you can see what I’m talking about.
The Size of the Cover Image is 1000x1000 and I just want it to where you click the video instead of it being a 6x9 ratio I want it to be square with now black fill behind the video
I understand you want to embed YouTube videos on your product page and have them match the size of your cover image (1000x1000 pixels) without the black borders. Here’s how you can achieve this using HTML and CSS:
HTML Code
First, ensure your YouTube video embed code is set to match the dimensions of your cover image:
CSS Code
Next, add some CSS to remove the black borders and ensure the video fills the entire container:
Hi Jennifer, thanks for the reply. So Im not sure if it is embedded or not. I Uploaded the video through the Upload URL on the Media area on the Product Page where you can edit all the details of that product. So I don’t know if it uses iFrame tag. I just cant seem to find the right code to target that video to remove the black boarder spacing.
The configuration for the YouTube video is set to have a width greater than its height.
Even though the video inside has a 1:1 aspect ratio, it will still be displayed with a 16:9 aspect ratio.
In this case, the video’s width will be full-width, while the height will adjust automatically. It cannot have a fixed height as mentioned, because it will change depending on the screen size.