CCS Embed code to center Youtube video

Hi Folks, I spent ages trying to get the right CSS code that would centre my Youtube video on my course landing page. Finally I got a winner! All you do is add this piece of code to the beginning of the standard embed code that you get from your Youtube video. 

<div style="text-align: center">

Cheers, Danielle

5 people have this question

Thanks for sharing, Danielle!

So awesome! I used it for my prelaunch landing page, which after the video tutorial How to Make a Landing Page Method 2, I had my embedded mailchimp signup horizontal form aligned to the left.

I put this code in the magic spot:


Be sure to add a closing div so that your finished code looks like this: <div style="text-align: center"> "your video link here"</div>

Login to post a comment