Video with Coding Shows Up Off Center: Custom CSS

Video with Coding Shows Up Off Center: Custom CSS

Alisha_Jemelian
Explorer
72 0 11

Hi! 

 

I recently added a snippet of code to my product pages (example at https://www.oneblushingbride.net/products/patience-fingertip-wedding-veil-with-lace-trim-in-white-of... This code allowed me to embed the video directly into my product pages (I followed the tutorial for this at https://www.youtube.com/watch?v=zaqJOqQdva0&t=591s).

 

The one quirk is that it makes the video off-center to the left when users are browsing my website in full screen mode. Is there any code I can add to make it centered? Thank you!

 

The code I inserted was this:

 

<video controls="" style="max-width: 100%;">

 

    <source src="YOUR_VIDEO_URL" type="video/mp4">

 

    Sorry, your browser doesn't support embedded videos.

</video>

Replies 2 (2)

made4Uo
Shopify Partner
3873 718 1220

Hi @Alisha_Jemelian,

 

You can center the video by following the instructions below

 

1. From you Admin page, go to Online store > Themes > Click the three dots on the theme you want to edit > Edit code
2. Go to Asset folder and open the base.css file

 

.section-template--16736051495163__4d31a4d1-e579-4664-9261-34b4e6d09bdd-padding {
    display: flex;
}

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
Alisha_Jemelian
Explorer
72 0 11

Thank you for taking the time to help!

 

I tried your suggestions (screenshot below), and it still shows off center when in "fullscreen" mode. It shows up fine for the mobile view though.

 

Any suggestions?Screenshot 2023-05-02 at 9.38.06 AM.pngScreenshot 2023-05-02 at 9.38.38 AM.png