Note: I got this code from multiple sources but can't remember from where because it was so long ago.
As you can see in our forum I created two fluid width video modules. They were created site builder vertically on top of one another: https://www.christforums.org
First I created two static html modules. And the Youtube address needs be the embed address.
Video Module 1:
Video Module 2:
You probably will need to replace the widget id number with yours. Then in additional_css add the following:
And the following to additonal_css to keep the videos from displaying on small screen sizes:
Enjoy,
William
As you can see in our forum I created two fluid width video modules. They were created site builder vertically on top of one another: https://www.christforums.org
First I created two static html modules. And the Youtube address needs be the embed address.
Video Module 1:
Code:
<div class="videoWrapper"> <!-- Copy & Pasted from YouTube --> <iframe width="560" height="349" src="https://www.youtube.com/embed/FkNA9RtAQL8" frameborder="0" allowfullscreen></iframe> </div>
Code:
<div class="videoWrapper2"> <!-- Copy & Pasted from YouTube --> <iframe width="560" height="349" src="https://www.youtube.com/embed/FkNA9RtAQL8" frameborder="0" allowfullscreen></iframe> </div>
PHP Code:
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 10px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
div#widget_238.b-module.canvas-widget.default-widget.custom-html-widget {
width: 50%;
height: 100%;
border:thick solid #1C4F70 !important;
}
.videoWrapper2 {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 10px;
height: 0;
}
.videoWrapper2 iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
div#widget_239.b-module.canvas-widget.default-widget.custom-html-widget {
width: 50%;
height: 100%;
border:thick solid #1C4F70 !important;
}
And the following to additonal_css to keep the videos from displaying on small screen sizes:
PHP Code:
@media screen and (max-width: 667px) {
div#widget_238.b-module.canvas-widget.default-widget.custom-html-widget {
display:none;
}}
@media screen and (max-width: 667px) {
div#widget_239.b-module.canvas-widget.default-widget.custom-html-widget {
display:none;
}}
William
Comment