Placing Videos Between Sections

Can you please help me understand what code would be used to place a video between Cornerstone sections?

Hey there,

Thanks for writing in! You can add the video element in the second section and then using negative margin we can shift the video up so it will be in between the two sections. To give the negative margin click on Customize tab (see screenshot)

Then add the following code in the Element CSS section (see screenshot)

$el {
  margin-top: -150px;
}

You can adjust the margin as per your need. I checked your demo link and they have followed the same approach.

To learn more about margins see https://www.w3schools.com/cssref/pr_margin.asp

Hope this helps!

Thank you!

Just one last question. When using the max-width field, how do I center the video to the page. When I enter a value in the max-width setting the video automatically aligns left.

Hi There,

Thanks for writing in!

You can use the element CSS to put the margin auto css for the video element.

$el {
margin: 0px auto;
}

Hope this helps.

Thanks

Thank you this works perfectly.

You are most welcome. :slight_smile:

Will this element CSS work for a column element CSS?

Hi,

You can try this code instead,

$el {margin: 0px auto !important; float:none;}

Hope this helps

That worked. Thanks!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.