When we first started using WordPress, we found that centering a video could be unexpectedly challenging.
Through our experience at CanadaCreate, we discovered that many beginners share this struggle – it’s one of the most frequently asked formatting questions.
The good news is that centering videos in WordPress has become significantly simpler, especially with the introduction of the block editor. However, many users still face difficulties, particularly with embedded videos from platforms like YouTube or Vimeo.
In this easy-to-follow guide, we will demonstrate the simplest methods to center align your videos in WordPress.
Why Should You Center Align Videos in WordPress?
By default, WordPress aligns embedded or uploaded videos to the left. This is a practical choice, as the editor cannot predict your preferred layout for every page.
However, leaving a video left-aligned can often result in awkward white space and an unbalanced design. Centering your video, however, creates a strong focal point that captures your visitors’ attention.
Centering your video helps direct the viewer’s gaze and enhances the overall viewing experience.
Now, let’s explore how you can easily center-align a video on your WordPress website.
This guide includes instructions for both the block editor and the classic editor. You can use the links below to navigate to any specific section you need.
- Center Aligning Videos in the WordPress Content Editor
- Center Aligning Videos in the Classic Editor
- Common Questions About Centering Videos
Center Aligning Videos in the WordPress Content Editor
To ensure your video spans the entire width of your content area, simply add a YouTube or Vimeo video URL directly into the WordPress content editor.
Start by editing an existing post or page, or create a new one. In the content editor, paste the video link, and WordPress will automatically embed the video for you.
Next, select the Video block and click on the ‘Change Alignment’ option. From the dropdown menu, choose the desired video alignment.
WordPress offers the following alignment options:
- Wide Width
- Full Width
- Align Left
- Align Center
- Align Right
Select the ‘Align Center’ option.
After making your selection, you can preview and publish your post or page.
Your video will now be perfectly center-aligned.
If you want to include special playback options, such as starting the video at a specific time, or if you’re using a video platform that WordPress doesn’t automatically support, you’ll need to use the full embed code.
In this case, you will need to wrap your video’s embed code with some simple HTML.
Start by clicking the three-dot menu in the video block. Then, select the ‘Edit as HTML’ option from the dropdown menu.
Next, you can insert the following HTML code around your video’s embed code:
<div style="text-align: center;">
// Your video embed code goes here
</div>
Here’s how your embed code will appear with the added HTML.
You can now save your changes and preview the post or page to see your video centered perfectly.
Alternatively, you can manually adjust the width of your video to match the content area. To do this, modify the ‘width’ parameter in your embed code:
<iframe title="LIVE LIFE YOUR WAY AT CAVENDISH MANOR" src="https://www.youtube.com/embed/zU1WXNrP0Mk" width="760" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>How to Center Align Videos in the Classic Editor
To center-align videos in the Classic Editor, edit an existing post or create a new one.
In the editor, switch to the Text view and insert the following HTML code:
<div style="text-align: center;">
// Your video embed code goes here
</div>
Ensure you replace ‘your video embed code goes here’ with the actual embed code of your video.
After that, it should resemble this:
You can now preview and publish your page.
Simply visit your website to view the center-aligned video.
Frequently Asked Questions About Centering Videos
Here are some common questions our readers ask about centering videos in WordPress:
Why can’t I find the ‘Wide width’ and ‘Full width’ alignment options?
The ‘Wide width’ and ‘Full width’ options depend on your WordPress theme’s support. If they are missing from the alignment toolbar, your current theme does not enable them. However, you can still use the standard ‘Align center’ option.
Will centering my video impact its appearance on mobile devices?
No, centering a video with the standard WordPress block editor tools is fully responsive. WordPress automatically adjusts the scaling to ensure your video displays beautifully on smaller screens like tablets and smartphones.
Can I center a video that I uploaded directly to WordPress?
Yes, the process is identical for both embedded videos and those uploaded directly to your media library. Just select the Video block and use the alignment toolbar to center it.
We hope this article has helped you learn how to center-align a video in WordPress. You might also want to check out our guide on adding special characters in WordPress posts and essential tips for using shortcodes in WordPress.
If you enjoyed this article, please subscribe to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.



