Newbie’s Guide: How to Center Align a Video in WordPress

Do you wish to center-align a video in WordPress?

By default, if your video’s width is less than your post location, then WordPress instantly aligns it to the left, leaving additional white area on the best side.

In this short article, we will reveal you how to quickly focus line up a video in WordPress.

Why Center Align Videos in WordPress?

When you embed a video in WordPress, it immediately aligns them to the left by default. This is since videos are external material embedded in the material, so WordPress is not able to think how you want to show it.

As a finest practice, it instantly aligns it to the left, leaving it as much as you to change the positioning if required.

By lining up the video to the center, users will have a much better experience seeing your material. By doing this, you will not have visible blank area on the one side of the page, which might provide a less than professional appearance.

If you submit videos straight to WordPress, the exact same thing will take place to them if their width is less than your material location. WordPress will align them to the left by default.

That being stated, let’s see how you can quickly center-align a video in a WordPress site. We’ll cover both the block editor and timeless editor, so you can click the links listed below to leap ahead to any area.

  • How to Center Align Video in WordPress Content Editor
  • How to Center Align Video in the Classic Editor

How to Center Align Video in WordPress Content Editor

If you desire your video to fill the width of your material location, then the very best method to do this is by including a YouTube or Vimeo video URL straight in the WordPress material editor.

You’ll require to modify a post or a page or include a brand-new one. As soon as you remain in the material editor, just paste the link to the video. WordPress will embed the video instantly.

Paste video embed code in block editor

Next, pick the video block and after that click the Modification Alignment choice. From the dropdown menu, you can select the position of the video.

WordPress lets you pick from the following positionings:

  • large width
  • complete width
  • line up left
  • line up center
  • Line up.

Go on and choose the ‘Align center’ choice.

Line up the video to the center

After that, you can sneak peek and release your page or post.

The video will now be center-aligned.

Lined up video sneak peek

In some cases for one factor or another, you might require to utilize the embed code. Because case, you will require to include some easy HTML around your video’s embed code.

You require to click the 3 dotted icons in the video block. After that, you can pick the ‘Edit as HTML’ alternative from the dropdown menu.

Modify as HTML

Next, you can get in the following piece of HTML code around the embed code of the video:

/// your video embed code goes here

Here’s what your embed code would appear like with the customized HTML.

Sneak peek of custom-made HTML code

You can now conserve your modifications and sneak peek the post or page. Your video will be nicely lined up in the center of your material location.

Another method is to by hand increase your video’s width to fit the content location. To attain this, you require to include or alter the ‘width’ specification in your embed code.

How to Center Align Video in the Classic Editor

If you’re utilizing the Classic editor, then you can focus line up videos by modifying a post or developing a brand-new one.

As soon as you’re in the editor, switch to the Text view. Now go into the following HTML code:

/// your video embed code goes here

Simply make certain to change ‘your video embed code goes here’ with your video’s embed code.

When that’s done, it will look something like this:

Line up videos in timeless editor

You can now sneak peek and release your page.

Just visit your site to see the center-aligned video.

Lined up video timeless editor sneak peek

We hope this post assisted you find out how to focus line up a video in WordPress. You might likewise wish to see our guide on how to begin a WordPress blog site and essential WordPress plugins.

At SellingsVibe, we offer many services.

SVisionary

Leave a Reply

“You're more than just a customer; you're the hero of our stories.”

Subscribe our

Weekly Posts

to receive a variety of interesting content, special promotions and exclusive discounts. Stay ahead of the game with our exclusive updates on the latest AI technology and the trend of the digital world!