
Under normal circumstances, when we want to align images, WordPress will give us the options when we upload the particular image. On the other hand, if the image source is from a different site and you have permission to use it, you can use the div align tag to align the image manually to our preferences. All you have to do is to wrap the image source codes with the div align tags like this:
<div align="center">The Image Source code</div>
All your images will be aligned to the center of your post. It can also be aligned to the left or right.
Similarly, if you want your embedded videos to be aligned to the center of your post, you too can use the same tags like the example below.
<div align="center">
<object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/RexXDDA8RoI&hl=en_US&fs=1&rel=0&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/RexXDDA8RoI&hl=en_US&fs=1&rel=0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object></div>
This will result in your videos sitting right at the center.
Nice and neat. While you are here, enjoy the video. It never cease to amaze me as to how in 1928, when computers and CGI software have not been invented yet, these guys can come up with such lively cartoons.




i usually use if I want the video centered. Before, I get really frustrated when the video frame is not where i intended it to be.
Awesome tip! Thanks for sharing.
I just use
sigh this code in comments
Just testing the code tag.
<div align="center">all my text</div>okay, should be fine the next time you use the code tag. Sorry about that.
hi hi hi
what do u type cause I can’t achieve that effect really…. all I wanted to say is that i use the center tag but this might save me a minute or 2 as well
Rest easy mate, it’s no fault of yours. It’s on my side. I’ve fixed it and you can use the code tag from now on in the comments.
Oh all right
I thought I am an idiot for not being able to make it work. I tried it on my comments as well, not working, will look into it
although it’s not that big a deal
Thanks for the tips..
OMG! I think this has actually worked, I’ve been trying to find a way to get YouTube vids working in a WordPress blog for a while now and was having a problem centering them!
Thanks!!