Vide icon indicating copy to clipboard operation
Vide copied to clipboard

Video Background Full Height

Open chopwoodwater opened this issue 11 years ago • 2 comments

The video plugin is playing video correctly. I need your help on setting video height as full page. The solution on the link below does not work in my case. If a specific height like 400px is set for the video, it will display. If height:100% is set, it will disappear.

https://github.com/VodkaBears/Vide/issues/81

Here is my html code:

<div class="row" id="video-home" data-vide-bg="{{ MEDIA_URL}}myvideo.mp4" 
data-vide-options="posterType: 'detect', loop: true, muted: true, resizing: true, 
position: 0% 0%, bgColor: 'transparent'">
</div>

css styling

video-home {

width: 100%;
/*height: 400px;*/
min-height: 100%;
/*background-size: cover;*/

}

Could anyone tell me why that is the case? Thanks!

chopwoodwater avatar Nov 21 '15 02:11 chopwoodwater

What we normally do is wrap the the div that vide is targeting within a div and then control that div with jQuery to make it full height. More info can be found here with something similar: http://www.jqueryrain.com/2013/03/div-full-widthheight-of-viewport-with-jquery/

ghost avatar Nov 27 '15 15:11 ghost

CSS vh units can be useful in some situations:

http://www.w3schools.com/cssref/css_units.asp

joelbrennan0 avatar Feb 01 '17 16:02 joelbrennan0