Jump to content

Video on home screen with dynamical size


REGI0

Recommended Posts

Hello

I would like to put video on the home page, which will start automatically after the page loads.

I tried to use modules Contentbox or HTML box. The film displays correctly and starts, but I have a problem with the size of the movie. I want it to change dynamically depending on the size of the browser window so it will look good on all screen resolution, and on mobile devices. When trying to insert a movie without a specified size in html code it add size automatically (width and length with default size 300 x 150). Please help me how to do it dynamically thanks in advance

Link to comment
Share on other sites

 

Hello
I would like to put video on the home page, which will start automatically after the page loads.
I tried to use modules Contentbox or HTML box. The film displays correctly and starts, but I have a problem with the size of the movie. I want it to change dynamically depending on the size of the browser window so it will look good on all screen resolution, and on mobile devices. When trying to insert a movie without a specified size in html code it add size automatically (width and length with default size 300 x 150). Please help me how to do it dynamically thanks in advance

 

thx to vekia

<div class="video-container">INSERT IFRAME HERE</div>
<style>
.video-container {
    position:relative;
    padding-bottom:56.25%;
    padding-top:30px;
    height:0;
    overflow:hidden;
}

.video-container iframe, .video-container object, .video-container embed {
    position:absolute;
    top:0;
    left:0;
    width:100%!important;
    height:100%!important;
}
</style>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...