How can I adjust the dawn theme code for portrait product videos?

Hi, does anyone know how to fix or have the code to make my product videos as portrait. When I click on it, it’s showing my image background and it’s not showing up as portrait. Thanks in advance.

Url: https://lua-wolves-crystals.myshopify.com

password: bahcri

Hi @Popcorn ,

Go to Assets > base.css and paste this at the bottom of the file:

@media screen and (max-width: 749px) {
	.product-media-modal__dialog .global-media-settings {
		padding-top: 100vh !important;
	}
}

Hope it helps!

Hi! I tried the coding but unfortunately, it didn’t work. I checked on android, iphone, and my computer and they all had the same issue. I’m trying to upload my videos as 3:4 ratio straight from my phone into the app. But it keeps showing up as landscape where the sides of the video are transparent or shows my background, depending on what device you use.

Here’s a screenshot of what I’m experiencing. Ive tried contact shopify support but they told me to come here instead to look for a solution.

Hi @Popcorn ,

My previous tutorial is only for mobile, if you want to show desktop, please

go to Assets > base.css and paste this at the bottom of the file:

@media screen and (min-width: 750px) {
  .product__media-list .deferred-media {
        padding-top: 133% !important;
  }
}

Hope it helps!

Thanks so much! The only issue I’m having now is that on my mobile phone, the video looks stretched out when I click on it. Is there any way to fix this? Thanks in advance!

Hi @Popcorn ,

Go to Assets > base.css and paste this at the bottom of the file:

@media screen and (max-width: 749px) {
	.product-media-modal__dialog .global-media-settings video{
		height: auto !important;
		bottom: 0 !important;
		margin: auto !important;
	}
}

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

When I click on the videos in my phone, the videos still seem stretched out at first. I would have to press the play button to revert it back to its original size. Is there any way to prevent it from stretching out and having it fixed and still? Thanks. :slightly_smiling_face:

I’ve tried the code but I still have the same issue regarding the video stretching out.

Hi @Popcorn ,

Please add code:

@media screen and (max-width: 749px) {
	.product-media-modal__dialog .deferred-media__poster img{
		    width: 100% !important;
    height: auto !important;
	}
}

Thank you so, so much! Truly grateful for your help. Your codes has helped resolve the video issues. I appreciate your patience & help! :slightly_smiling_face:

1 Like