<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WPWife &#187; wordpress videos</title>
	<atom:link href="http://www.wpwife.com/category/wordpress-videos/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpwife.com</link>
	<description>WPHelp: fix and optimise WP themes&#38;plugins</description>
	<lastBuildDate>Fri, 21 Nov 2025 12:00:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.38</generator>
	<item>
		<title>Beginner’s Guide: How to Center Align a Video in WordPress</title>
		<link>http://www.wpwife.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress</link>
		<comments>http://www.wpwife.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress#comments</comments>
		<pubDate>Mon, 05 Mar 2018 12:36:10 +0000</pubDate>
		<dc:creator><![CDATA[Editorial Staff]]></dc:creator>
				<category><![CDATA[Beginners Guide]]></category>
		<category><![CDATA[center align]]></category>
		<category><![CDATA[center align videos in wordpress]]></category>
		<category><![CDATA[embed videos in wordpress]]></category>
		<category><![CDATA[video alignment]]></category>
		<category><![CDATA[wordpress videos]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=50897</guid>
		<description><![CDATA[
<p>Do you want to center-align a video in WordPress? By default, if your video&#8217;s width is less than your article area, then WordPress automatically aligns it to the left, leaving extra white space on the right side. In this article, we will show you how&#8230;&#160;<strong><a href="https://www.wpbeginner.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress/">Read More &#187;</a></strong></p>
<p>The post <a href="https://www.wpbeginner.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress/">Beginner&#8217;s Guide: How to Center Align a Video in WordPress</a> first appeared on <a href="https://www.wpbeginner.com/">WPBeginner</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Do you want to center-align a video in WordPress? </p>



<p>By default, if your video&#8217;s width is less than your article area, then WordPress automatically aligns it to the left, leaving extra white space on the right side.</p>



<p>In this article, we will show you how to easily center align a video in WordPress.</p>



<figure class="wp-block-image size-full"><img width="680" height="385" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-align-a-video-in-wordpress.png" alt="How to center align a video in WordPress" class="wp-image-153638" title="How to center align a video in WordPress" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-align-a-video-in-wordpress.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/center-align-a-video-in-wordpress-300x170.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<h4>Why Center Align Videos in WordPress?</h4>



<p>When you <a title="How to Easily Embed Videos in WordPress Blog Posts" href="https://www.wpbeginner.com/beginners-guide/how-to-easily-embed-videos-in-wordpress-blog-posts/">embed a video in WordPress</a>, it automatically aligns them to the left by default. This is because videos are external content embedded in the content, so WordPress is unable to guess how you would like to display it.</p>



<p>As a best practice, it automatically aligns it to the left, leaving it up to you to adjust the alignment if needed. </p>



<p>By aligning the video to the center, users will have a better experience viewing your content. This way, you won&#8217;t have noticeable blank space on the one side of the page, which could give an unprofessional look. </p>



<p>Besides, if you <a title="Why You Should Never Upload a Video to WordPress" href="https://www.wpbeginner.com/beginners-guide/why-you-should-never-upload-a-video-to-wordpress/">upload videos directly to WordPress</a>, the same thing will happen to them if their width is less than your content area. WordPress will align them to the left by default. </p>



<p>That being said, let&#8217;s see how you can easily center-align a video in a <a href="https://www.wpbeginner.com/guides/" title="How to Make a WordPress Website in 2022 (Ultimate Guide)">WordPress website</a>. We&#8217;ll cover both the block editor and classic editor, so you can click the links below to jump ahead to any section. </p>



<div class="wp-block-aioseo-table-of-contents"><ul><li><a href="https://www.wpbeginner.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress/#aioseo-how-to-center-align-video-in-wordpress-content-editor">How to Center Align Video in WordPress Content Editor</a></li><li><a href="https://www.wpbeginner.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress/#aioseo-how-to-center-align-video-in-the-classic-editor">How to Center Align Video in the Classic Editor</a></li></ul></div>



<h4 id="aioseo-how-to-center-align-video-in-wordpress-content-editor">How to Center Align Video in WordPress Content Editor</h4>



<p>If you want your video to fill the width of your content area, then the best way to do this is by adding a YouTube or <a rel="nofollow noopener"  title="Vimeo" href="https://www.wpbeginner.com/refer/vimeo/" data-shortcode="true">Vimeo</a> video URL directly in the <a href="https://www.wpbeginner.com/beginners-guide/14-tips-for-mastering-the-wordpress-visual-editor/" title="16 Tips for Mastering the WordPress Content Editor">WordPress content editor</a>.</p>



<p>First, you&#8217;ll need to edit a post or a page or add a new one. Once you are in the content editor, simply paste the link to the video. WordPress will embed the video automatically. </p>



<figure class="wp-block-image size-full"><img width="680" height="247" src="https://www.wpbeginner.com/wp-content/uploads/2020/10/paste-video-embed-code.gif" alt="Paste video embed code in block editor" class="wp-image-118289" /></figure>



<p>Next, select the video block and then click the <strong>Change Alignment</strong> option. From the dropdown menu, you can choose the position of the video. </p>



<p>WordPress lets you choose from the following alignments:</p>



<ul><li>wide width</li><li>full width</li><li>align left</li><li>align center</li><li>align right. </li></ul>



<p>Go ahead and select the &#8216;Align center&#8217; option.</p>



<figure class="wp-block-image size-full"><img width="680" height="358" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/align-the-video-to-the-center.png" alt="Align the video to the center" class="wp-image-150613" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/align-the-video-to-the-center.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/align-the-video-to-the-center-300x158.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>After that, you can preview and publish your page or post. </p>



<p>The video will now be center-aligned. </p>



<figure class="wp-block-image size-full"><img width="680" height="380" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-aligned-video-preview.png" alt="Center aligned video preview" class="wp-image-150614" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-aligned-video-preview.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/center-aligned-video-preview-300x168.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>However, sometimes for one reason or another, you may need to use the embed code. In that case, you will need to add some simple HTML around your video&#8217;s embed code.</p>



<p>First, you need to click the 3 dotted icons in the video block. After that, you can select the &#8216;Edit as HTML&#8217; option from the dropdown menu. </p>



<figure class="wp-block-image size-full"><img width="680" height="362" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/edit-as-html-2.png" alt="Edit as HTML" class="wp-image-154328" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/edit-as-html-2.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/edit-as-html-2-300x160.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>Next, you can enter the following piece of <a href="https://www.wpbeginner.com/wp-tutorials/how-to-edit-html-in-wordpress-code-editor-beginners-guide/" title="How to Edit HTML in WordPress Code Editor (Beginner’s Guide)">HTML code</a> around the embed code of the video:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; title: ; notranslate">
&lt;div style=&quot;text-align:center;&quot;&gt;

/// your video embed code goes here

&lt;/div&gt;
</pre></div>


<p>Here&#8217;s what your embed code would look like with the custom HTML. </p>



<figure class="wp-block-image size-full"><img width="680" height="175" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/preview-of-custom-html-code.png" alt="Preview of custom HTML code" class="wp-image-150627" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/preview-of-custom-html-code.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/preview-of-custom-html-code-300x77.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>You can now save your changes and preview the post or page. Your video will be neatly aligned in the center of your content area.</p>



<p>Another approach is to manually increase your video&#8217;s width to fit the content area. To achieve this, you need to add or change the &#8216;width&#8217; parameter in your embed code.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; title: ; notranslate">
&lt;iframe width=&quot;760&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4YpyiJ05YOg&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen&gt;&lt;/iframe&gt;
</pre></div>


<h4 id="aioseo-how-to-center-align-video-in-the-classic-editor">How to Center Align Video in the Classic Editor</h4>



<p>If you&#8217;re using the Classic editor, then you can center align videos by editing a post or creating a new one. </p>



<p>Once you&#8217;re in the editor, switch to the Text view. Now enter the following HTML code: </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; title: ; notranslate">
&lt;div style=&quot;text-align:center;&quot;&gt;

/// your video embed code goes here

&lt;/div&gt;
</pre></div>


<p>Just make sure to replace &#8216;your video embed code goes here&#8217; with your video&#8217;s embed code. </p>



<p>Once that&#8217;s done, it will look something like this:</p>



<figure class="wp-block-image size-full"><img width="680" height="311" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-align-videos-in-classic-editor-1.png" alt="Center align videos in classic editor" class="wp-image-154331" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-align-videos-in-classic-editor-1.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/center-align-videos-in-classic-editor-1-300x137.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>You can now preview and publish your page. </p>



<p>Simply visit your website to see the center-aligned video. </p>



<figure class="wp-block-image size-full"><img width="680" height="363" src="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-aligned-video-classic-editor-preview.png" alt="Center aligned video classic editor preview" class="wp-image-150658" srcset="https://www.wpbeginner.com/wp-content/uploads/2018/03/center-aligned-video-classic-editor-preview.png 680w, https://www.wpbeginner.com/wp-content/uploads/2018/03/center-aligned-video-classic-editor-preview-300x160.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>We hope this article helped you learn how to center align a video in WordPress. You may also want to see our guide on <a href="https://www.wpbeginner.com/start-a-wordpress-blog/" title="How to Start a WordPress Blog in 2022 – Beginners Guide (UPDATED)">how to start a WordPress blog</a> and <a href="https://www.wpbeginner.com/showcase/24-must-have-wordpress-plugins-for-business-websites/" title="24 Must Have WordPress Plugins for Business Websites in 2022">must-have WordPress plugins</a>.</p>



<p>If you liked this article, then please subscribe to our <a href="https://youtube.com/wpbeginner?sub_confirmation=1"  rel="noreferrer noopener nofollow" title="Subscribe to WPBeginner YouTube Channel">YouTube Channel</a> for WordPress video tutorials. You can also find us on <a href="https://twitter.com/wpbeginner"  rel="noreferrer noopener nofollow" title="Follow WPBeginner on Twitter">Twitter</a> and <a href="https://facebook.com/wpbeginner"  rel="noreferrer noopener nofollow" title="Join WPBeginner Community on Facebook">Facebook</a>.</p><p>The post <a href="https://www.wpbeginner.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress/">Beginner’s Guide: How to Center Align a Video in WordPress</a> first appeared on <a href="https://www.wpbeginner.com/">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpwife.com/beginners-guide/beginners-guide-how-to-center-align-a-video-in-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="0" type="" />
		</item>
	</channel>
</rss>
