- Wrap Text Around YouTube Video
Sometimes you'll want your video to fill up the entire page and other times you may just want to position it like you would an image. On the left or the right of the page.
So we're going to use a tiny bit of code.
Code and HTML are not a four-letter words they're just groups of letters. HTML is Hyper-Text Markup Language.
Whenever you use HTML it's important to type it in exactly as shown including the punctuation and spaces (or no spaces as the case may be).
Get the embed code for the video you want to use from YouTube Embed YouTube Video in WordPress
The code you get from YouTube will look like:
And when you add the code before and after it should look like this:
Here's the code for you to copy and paste into the Text tab:
<div style="float: right; margin: 0 0 20px 20px;" rel="float: right; margin: 0 0 20px 20px;"><iframe src="https://www.youtube.com/embed/x5gzHSE9keU?rel=0&showinfo=0" width="420" height="236" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>
So what you need to add is the top line and the bottom line.
This will float the video to the right of the text like in the image above.
The four numbers in the margin attribute are:
1st number = top (above the video)
2nd number = right (to the right of the video)
3rd number = bottom (below the video) and
4th number = left (to the left of the video)
You can play with these numbers until you get it looking just the way you like.
Here's an image of the code to float the video to the left:
If you use this in your website please include a link to the post or page to share with our community.
More training by Marion Black - sorted
Please click 'Like This' (if you do). Ask a question, share something or leave a comment.