Add Margin After Video in WordPress

This beginners tip provides a basic solution so you can add some space below your self hosted videos in WordPress.

If you’re embedding YouTube videos in WordPress, you shouldn’t have this problem:

no margin after video

And here’s what this solution does:

margin below video

To embed a self hosted video in your WordPress editor, you simply upload it to your Media Library and paste the full URL to the video on its own line in your Text editor like this:

no margin added tp video

To add a space between the bottom of your video and your text, simply wrap your video URL in a new div class like this:

video div

And then add your CSS to your child themes style.css file like this:

.video-margin {
    margin-bottom: 20px;
}

Maybe this is something that should be built into parent themes.

Pretty simply tip but one which won’t cause a problem if you remove the CSS and use another solution down the track like shortcodes will.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.