Align youtube video
This may be a really stupid question… but how do I center my youtube video properly? I’ve already used things like:
<div style=”text-align:center;”>[youtube https://www.youtube.com/watch?v=KX2TgM5rN1w?rel=0&showinfo=0&w=560&h=315%5D</div>
But every time I update my page it doesn’t work… Sometimes the code disappears when I update. Once or twice, the code saves but when I refresh the page in the browser, I see it centered for a split second and it gets to the left again.
Thanks in advance.
The blog I need help with is thedghub.com.
Would you mind making your site public temporarily so I can take a look?
Sorry… my mistake. It is now public. This is the url of the “problem” -> https://thedghub.com/davidegravato/
It looks like the iframe has some inline style which are overriding any styles applied to the wrapping <div>. There may be a way to override it but you would need access to the Custom CSS feature.
Another option is to simply use the Youtube url without the shortcode. This way your video would stretch the full length of the content area. Here’s some info on that:
Let me know if that solves it.
I noticed the post is no longer up so I will assume you’ve resolved the issue. I will mark this as resolved. Feel free to post a new topic if you still have questions.
The topic ‘Align youtube video’ is closed to new replies.