Youtube Embed and Centering
-
So I’ve read through the posts and seen similar issues but none quite described the same as mine (or I don’t understand – which is probable)
I can put the youtube link and have wordpress automatically turn it into the video embedded in my post but I can’t seem to center it. All the things I’ve read such as just using
<center> </center>doesn’t work. If I use [embed] it does become centered – but the video doesn’t work. So I’m not sure if the issue is in my website coding somewhere or what…the site is http://www.footstonephoto.com/blog
I’m not sure what other information I can give to help describe the issue. I’m also like beginner level as far as css/php goes, just a heads up.
Thanks!!
-
While writing new post, did you switch to “TEXT mode” and added this:
<center> http://youtube.com/watch?v=id </center>Because you can’t inset code in the visual mode..
Yes Samuel, I did that – all that happens is instead of showing any video it changes to just showing the youtube link (left aligned)
Yes, I edited the answer. Try to put the YT link in an independent line:
<center> http://youtube.com/watch?v=id </center>It did the same with me while putting all the code in the same line, and the YouTube links needs an independent line..
I just tried it but still didn’t work. I tried both the longer youtube link and the shortened url but both just centered the link to the youtube video
Thank you for trying to help me!!
Hmmmm, that’s odd. I changed to text mode, which is a button in the top right corner of the text editing area when you’re editing a post, and this worked nicely:
<center>
http://youtube.com/watch?v=id
</center>Just so you know,
the
<center></center>html tag has been deprecated for some time now.This stack overflow article is from 2009…
http://stackoverflow.com/questions/1798817/why-is-the-center-tag-deprecated-in-htmlYou should be using
display:block; margin:0 auto;to center your elements.
Evan
WAIT! I just like changed the link from being
https://www.youtube.com/watch?v=RYpaOUH5hrY
to being
http://www.youtube.com/watch?v=RYpaOUH5hrY (http vs https)
and it worked. I don’t know anything about http/https so to me it’s just a straight up miracle. Thank thank thank thank you!!!
HTTP worked for you because your actual protocol is HTTP and not HTTPS. while you serve requests on HTTPS, the opposite will happen.
You’re welcome!
Edited as per the last sudden reply
The topic ‘Youtube Embed and Centering’ is closed to new replies.