• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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.

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.