WordPress Tutorial Videos by WP101®

175+ WordPress tutorial videos for non-techies.

  • About Us
    • Top WordPress Products
    • Testimonials
  • WordPress Tutorials
    • Intro to WordPress
    • WordPress 101
    • AIOSEO 101
    • WP Mail SMTP 101
    • Easy Digital Downloads 101
    • WPCode 101
    • WP Simple Pay 101
    • RafflePress 101
    • Elementor 101
    • WPForms 101
    • Spectra 101
    • How to Blog Better
    • WooCommerce 101
    • Beaver Builder 101
    • Ninja Forms 101
    • WP Rocket 101
  • Help Forum
    • Hire a WordPress Expert
  • Blog
  • Contact
  • Sign In

How to embed a video and float it right?

Get answers to your WordPress questions!

Tired of wasting time scouring Google for answers to your WordPress questions? Since 2008, we've helped countless WordPress site owners just like you get unstuck. Get answers to your WordPress questions — plus unlimited access to our entire library of 150+ WordPress tutorial videos. Why not join us today?

View Membership Options
WordPress Questions and Answers › How to embed a video and float it right?
0 Vote Up Vote Down
H
techygal
asked 9 years ago

I have had a really hard time embedding a video in my WordPress theme. After I just switched to a new theme, I could see the video in the text editor but it wouldn't show up in the browser. I tried the iframe tag but it didn't work at all. After trying lots of different code variations, finally I was able to get it to work by using this code, but I'm not sure it's the correct code:

[video height="280" width="400" align="right" src="https://youtu.be/mhnuES3Zgr4"][/video]

I can't seem to be able to float it to the right. Does anyone know how I would float it right? I've tried align='right' and style: alignright and I just can't get it to work. Here is the url: camwoodbats.com

Thanks for any help!

2 Answers
0 Vote Up Vote Down
Shawn Hesketh answered 9 years ago

Hi Techygal,

Usually, you can just use oEmbed, which enables you to simply paste the URL to a video directly within a post or page, and WordPress will automatically handle embedding and sizing the video appropriately.

But, if you want to customize the size of the video, you'll have to use the shortcode method, which is what you're describing above.

Here is the full documentation for the video shortcode:

https://codex.wordpress.org/Video_Shortcode

Unfortunately, as you'll notice, there is no shortcode parameter for aligning a video to the left, center, or right.

So, your best bet is going to be to add some HTML to wrap your video in a box which is aligned to the right. You can only do this in the Text mode of the Editor, so be sure you've switched to that mode. Then, you might try something like this:

<div style="width: 50%; float: right;"> https://youtu.be/mhnuES3Zgr4 </div>

This example should embed your video, and float it to the right. We're creating a box with a width of 50%, then positioning it to the right. In the box is the oEmbed URL for the video, which will allow WordPress to automatically embed the video(s), resizing to the fullest width of the enclosing box.

This should at least get you started.

0 Vote Up Vote Down
H
techygal
answered 9 years ago

You are a genius!! It worked! I have been trying to embed a video for two days.

So if I wanted to have two videos side by side on the same line, would I just use the exact same code underneath this code and change it to float: left?

By the way, on my last post, I had published some code in my response, and it just disappeared.. I guess the forum plugin ate my code:)

Thanks for all your help. I am going to check out your courses.

Please login or register to join the conversation!

Share this with someone?

FacebookTweetLinkedIn

Most Recent Questions

  • I took the Sprectra 101 course. Now I’m building my won web site but I still have the Specra Style Guide and I think it’s causing an issue with Sprectra One. How do I get rid of the Style guide? asked by Mallis01, 1 year ago
  • Can you offer any tips, or best practices, on how to redesign and upgrade an old website? asked by FSAuthor, 1 year ago
  • How to create a blog in Spectra? asked by TJ, 1 year ago
  • How do I make all the words show Uppercase? asked by iLoveToLiveWell.com, 1 year ago
  • Why does my right side dashboard top look different than course. asked by Blues1947, 2 years ago

Site Links

  • About Us
  • Your Account
  • Products We ❤️
  • Affiliates
  • Testimonials
  • Blog
  • Contact Us

Courses

  • WordPress 101
  • WooCommerce
  • Elementor
  • Spectra
  • WPForms
  • Ninja Forms
  • View All →

Products

  • WP101.com
  • WP101 Plugin
  • Embed our videos on your site!

Recent Posts

  • Shared Hosting vs. VPS vs. Managed WordPress Hosting: What Beginners Need to Know
  • All in One SEO Review 2025: Pros, Cons & Real Results
  • 7 Best Small Business Web Hosting Services (Expert Picks)
  • 10 Best SEO Rank Tracking Tools: Features, Tips & Hidden Gems
  • How to Install a WordPress Theme (Complete Step-by-Step Tutorial)

Connect with Us

  • Email
  • Facebook
  • Twitter

WordPress Tutorials by WP101© 2008-2025 WP101® LLC. All rights reserved.
WP101® is a registered trademark with the U.S. Patent and Trademark Office.
WP101® is hosted by SiteGround.
Privacy Policy | Terms of Use | Disclosure | WP101 Coupon