Home Home




Here is a trick how to embed YouTube videos to make them fit in all devices. Very useful if you use responsive themes:

First add a class in css:


.video-container {
    
positionrelative;
    
padding-bottom56.25%;
    
padding-top35px;
    
height0;
    
overflowhidden;
}
.
video-container iframe {
    
positionabsolute;
    
top:0;
    
left0;
    
width100%;
    
height100%;
}


Then add a div to the iframe for videos:


<div class="video-container"Embed code </div>


That will resize iframe embed code to fit the window

|  Links 
Printer Friendly Page Send this Article to a Friend



 


 
Module Demos
Top Downloads




© 2009 - 2014 all right reserved | Danordesign - Free XOOPS Modules and PHP Scripts | Powered by XOOPS