• Hi!

    I’m trying to center a youtube video but it doesn’t work: I’ve tried many different codes found on this forum, like this one for instance:

    <div style=”margin: 0px auto; text-align: center;”><iframe …></div>

    …but still not working.

    Any idea why it is not working?

    Thank you 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Finally something I might be able to answer!

    I’m super new to WordPress, so hopefully this will work with you like it does for me. If not, well, I’m still learning too with WordPress!

    Just put the link in center brackets like so:

    <center>YouTubeVideoHere</center>

    That’s how it centers videos for my company’s website.

    Hello!

    Use this <div style="text-align:center"><iframe goes here></div>.

    Thread Starter JulieKaz

    (@juliekaz)

    Thank you guys for your answers! So nice of you 🙂

    Unfortunately it’s still not working for some reasons 🙁

    Can this have something to do with the size of the youtube video? (just wondering)

    Hmm, it could be the size of the youtube video. Did you just copy/paste the link into your site? Cause there is a way to re-size that. Go to your youtube video page, and under where it says Share, click on embed.

    Code will come up where you can change the width/height of your video and then paste that code into your page.

    Hopefully I can help some more here! And then put the center brackets onto that embedded code.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Center a youtube video on wordpress’ is closed to new replies.