How to Adjust the Size of a WordPress Video?
When I uploaded an mp4 video to WordPress for the first time, I surprised to see that there was no tool to adjust its width and height. Moreover, I wanted to align the mp4 video at the center of the page, however, the alignment feature was not applying to the uploaded video. I understood, by default, WordPress doesn’t provide an option for altering the width and height of the video. This tutorial will show you how to change the height and width of your video uploaded in WordPress and then to align it in the middle of the post.
Once you finished uploading your video into a post or page and preview it. It may be appearing too big or too small! Let’s change the video size. Here’s a simple trick to change the width and height of the uploaded video. Simply click the ‘Text’ button as seen below.
Look for the code highlighted in red color. Now you can edit the code to alter the height and width as seen.
Change the dimensions within the width and height attributes and save. When done and then preview your video to get the required .mp4 video size.
How to Align a WordPress Video in the Middle of the Page?
Are you trying to position an mp4 video in the middle of the post or page instead of it being aligned to the left by default? Let’s see here how to center your videos adding a code in CSS.
In order to align it in the middle, you can apply this tweak,
Go to Appearance “Appearance -> Custom CSS -> Additional CSS
And paste the following code there:
.wp-video {
text-align: center;
margin-left: auto;
margin-right: auto;
}
After adding the code in CSS, publish it and all the videos will be automatically aligned in the middle of the page. Now you learned the way to center align and change the size of the video in WordPress.