I'm working of layout where top of page contains div with some images and video background and i have trouble making it to work right. When i made first version all looked right but problems started to come out when i wanted to make it work for different browser window widths. It looks as follows
Blue - DIV with video background, green - images, green with orange border - image that should be sticking to bottom of video in a way that half of its height is out of video, gray - regular page content.
I've ran into two issues, one is that i can't figure out way for image (orange border) to stay on bottom of video all the time with half of it out of video area. I'd like for it to be there all the time. Other images doesn't make so much problem with different browser window widths.
Second is background of DIV containing video, I've set it as placeholder in case browser doesn't support video tag. Containing DIV doesn't stretch to browser width as video does. I want it to be covered by video all the time - to change its size with change of video size.
Can someone suggest how to fix it to work desired way?
Here is code (width of page area on js fiddle might need adjusting to see the issue)
https://jsfiddle.net/yLmryL48/3/
body {margin: 0px;}
#video_box {
width:100%;
position:relative; height:720px;
background: url("http://i.imgur.com/X3mb6AD.jpg"); -webkit-background-size: cover;
-moz-background-size: cover; -o-background-size: cover; background-size: cover;}
#video_overlays {position:absolute; text-align:center; width:100%;}
#vt_logo, #vt_url { display:block;}
#vt_logo, #vt_url{display: block; width:50%;}
#vt_logo img, #vt_url img{display: inline-block;}
#vt_logo img{margin:50px 0 0 50px;}
#vt_url img{margin:50px 50px 0 0;}
#vt_logo {text-align:left; float:left;}
#vt_url {text-align:right; float:right;}
#slogan img{padding-top:110px; width:70%; height: auto;}
#slogan2 img{padding-top:110px; width:60%; height: auto;}
#icons img{padding-top:110px; width:70%; height: auto;}
#ccontainer {width: 100%; position: relative;}
#cvideo, #cmessage {width: 100%; height: 360px; position: absolute; top: 0; left: 0;}
#cvideo video {width: 100%;}
.banner_top { width: 100%; display: block; padding-bottom:150px;}
#lipsum {width: 60%; margin: 0 auto;}
<div class="banner_top">
<div id="video_box">
<div id="ccontainer">
<div id="cvideo">
<video preload="preload" autoplay="autoplay" loop="loop" muted poster="http://i.imgur.com/X3mb6AD.jpg">
<source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<div id="cmessage">
<div id="video_overlays">
<div id="vid_top">
<div id="vt_logo">
<img src="http://i.imgur.com/Od0DZBj.png">
</div>
<div id="vt_url">
<img src="http://i.imgur.com/ns80hYp.png">
</div>
<br style="clear:both;"/>
</div>
<div id="slogan">
<img src="http://i.imgur.com/JrOXRf2.png">
</div>
<div id="slogan2">
<img src="http://i.imgur.com/7mRLS9s.png">
</div>
<div id="icons">
<img src="http://i.imgur.com/XEEAcQx.png">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="lipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eu tortor mi. Etiam bibendum pellentesque dignissim. Cras eu massa elit. Ut sit amet metus porta, hendrerit mauris at, elementum massa. Duis malesuada ac odio id faucibus. Mauris malesuada elementum dui luctus tempor. Integer in lacus vel risus dignissim vehicula eget vel purus. Sed non sollicitudin arcu. Cras ac ligula at nisl vulputate fringilla et non est. Etiam placerat volutpat eros id facilisis. Nunc sollicitudin ipsum ipsum, vestibulum rutrum sem dapibus quis.
</p>
</div>