Centre a you tube video

Tourist
5 0 2

Hello

Was hoping someone would be able to tell me how I can centre a you tube video on a page - have embedded it and worked out how to change size, but would like it to be centre aligned and not left aligned. Am stuck!

Cheers

Mel

0 Likes
Astronaut
1890 1 395

You will likely need to edit the CSS and that change will depend on how your page is currently laid out.  Can you show an example of this embedded video in your shop?

0 Likes
New Member
8 0 0

Hi Mel,

We have an app made specifically for video display and management. Check out some of the examples on our app page: https://apps.shopify.com/dynavi-video-manager.

 

0 Likes
Shopify Expert
81 0 8

Hey Mel, 

Can you share the link to that video page ? so that i can able to give you  the exact css that you will need :)

Cheers

Cheers , Gopi | Shopify Expert (gopi@coderapper.com ) https://experts.shopify.com/code-rapper
0 Likes
Shopify Expert
9807 92 1561

Your theme is responsive so you really want a way to make sure the video is responsive. This site can sort you out with some responsive CSS. It might do exactly what you want so no harm in giving it whirl.

http://embedresponsively.com/

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Tourist
5 0 2

Cheers everyone - I had used that site to get the code but it wasn't working out central - but after a good bit of googling and some trial and error I finally found out what to do :)

0 Likes
Tourist
7 0 1

Then please share your wisdom. I'm sure it's not just you who have this question ;-) Right?

1 Like
Tourist
5 0 2

am no expert but I just switched to the html view on the page where the video was, and popped <div align="center">  above the iframe code - it worked for me. But I then kept the videos full size anyway as couldn't work out how to get them smaller without having a massive black box around them...

1 Like
New Member
2 0 0

How do you center it? I tried this link and it just made it to the left as well :(


@Jason wrote:

Your theme is responsive so you really want a way to make sure the video is responsive. This site can sort you out with some responsive CSS. It might do exactly what you want so no harm in giving it whirl.

http://embedresponsively.com/




<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='https://www.youtube.com/embed/FT5QxczJtwA' frameborder='0' allowfullscreen></iframe></div>
0 Likes
New Member
2 0 0

Worked for me! Thank you soooo much, was driving me nuts lol

0 Likes