Viewing 5 replies - 1 through 5 (of 5 total)
  • Try to wrap this code in a DIV with next styles:

    <div style="width:600px;margin:0 auto">
    [media url="http://www.youtube.com/watch?v=JJ--faib7to"]
    </div>
    Thread Starter vegan09.com

    (@vegan09com)

    No the video still is not centered and this code is visible above the video: <div style=”width:600px;margin:0 auto”>,

    and this is visible below the video: ,</div>

    but thank you for trying.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I’m not familiar with the [media] short code or that plugin but this does work in Twenty Eleven and the visual editor if you wrap it in [embed].

    [embed width="500" height="450"]http://www.youtube.com/watch?v=dQw4w9WgXcQ[/embed]

    I put in the width and height because Twenty Eleven was filling the video to the $content_width. That makes it difficult to demonstrate centering.

    Now highlight that line in the visual editor and center it.

    That will apply <p style="text-align: center;"> and the embedded video will be centered in the post.

    Vova

    (@gn_themes)

    You need to paste my code in HTML editor, not visual.

    Thread Starter vegan09.com

    (@vegan09com)

    That works Jan. Thanks both.

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

The topic ‘Center YouTube video’ is closed to new replies.