How To Center YouTube Video in WordPress?

Last updated on December 7th, 2016 at 05:45 pm

How to center YouTube Video in WordPress? There are other possible methods to center the video frame. Some might use plugins or like what I often do is to add the code manually.

It simply takes only a few steps with 2 coded lines for above and below the YouTube code.

Below sharing the steps.

Copying YouTube embedded code. From your YouTube video website.

  1. Click “Share” at top menu.
  2. Click “Embed”.
  3. Move mouse to select and copy code of your YouTube video.
  4. Alternatively, you could use keystroke CTRL+C to copy.

Pasting and Centering embedded code. From your WordPress interface.

  1. Click “Text” at tab menu. Next to the default “Visual”.
  2. Paste the your copied code into blank space in text box.
  3. Above pasted code, add this initial code line: <div style=”text-align:center;”>
  4. Below pasted code, add this ending line: /</div>

Click back to “Visual” tab, you should see YouTube is centered. In general, it should look this way in the “Text” box:

<div style=”text-align:center”>
Paste YouTube Code Here
/</div>

Copy Embeded Code, YouTube for WordPress

 

Centering YouTube Video In WordPress