How to Add a YouTube Video to a Lightbox

Adding video to your lightbox can be a great way to capture attention or show important information to your visitors. To add a YouTube video to a lightbox or pop-up form on your site, follow these steps.

NOTE: In addition to YouTube, this process will work for any video player that provides embed code, such as Vimeo.

First, click the Share link on your desired video, then the Embed tab. Copy the embed HTML.

skateboarding dog youtube video screenshot

Back in Digioh, open the editor for your lightbox and click the HTML tab under the Main Page section.

digioh custom HTML tab

Set the display mode to On, and paste the embed HTML into the box.

embed youtube code in your lightbox's custom HTML field

The video will appear in your lightbox once you add the code to the HTML box. Now, you can adjust the width and height. By default, YouTube sets their video dimensions larger than you may want for your lightbox. The example below cuts the length and width down to 1/3 of their original value to show a smaller video that fits nicely next to the form.

youtube embed code with adjusted dimensions

Experiment with the size and placement of the video to find what works best with your lightbox.

If you need help embedding your YouTube video, let us know, and we’ll be glad to help.

 

Tagged: