Objective
Have a modal that takes up the full width and height but requires no scrolling.
Problem
The video controls are too low and forces scrolling. I want the default video to be at full height, no less, no more.
Current State
I have this demo on codepen.
When you click for the modal (by pressing the play icon), the modal control to the video are pushed down because of the height of the top bar which has the button to close the modal. But for some reason I cannot really alter the height of the top bar.
Code
HTML
<div class="homepage-video">
<div class="hv-container">
<div class="hv-player">
<h3>Snowboarding Italy</h3>
<p>Check out our latest video</p>
<a href='#' onclick='overlay()'>
<span class="hv-play">
<i class="fa fa-play"></i>
</span>
</a>
</div>
</div>
</div>
<div id="overlay">
<div class="featured-video">
<a href='#' onclick='overlay()'>
<i class="fa fa-times-circle-o"></i>
</a>
<iframe src="//player.vimeo.com/video/17812340?color=2AD041" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
</div>
CSS
.homepage-video {
background-color: black;
background-size: cover;
background-repeat: no-repeat;
}
.homepage-video {
background-image: url('http://37.media.tumblr.com/7aaf860fb237c4322c9c8f35a3f41350/tumblr_mui2rf7PAp1r59v3fo1_1280.jpg');
background-position: center -60px;
}
.hv-container {
background-color: rgba(30,30,4, 0.6);
min-height: 240px;
position: relative;
}
.hv-player {
width: 320px;
max-width: 100%;
margin: 0 auto;
position: absolute;
top: 30px;
left:0; right: 0;
padding-top: 20px;
text-align:center;
}
.hv-player, .hv-player h3, .hv-play {
color: #f4f3f3;
}
.hv-play {
border: 3px solid #fff;
cursor:pointer;
padding: 4px 18px;
border-radius: 13px;
font-size: 30px
}
/* reset for IE*/
body { height:100%; margin:0; padding:0; }
/* code */
#overlay {
display: none;
position: absolute;
left: 0px;
top: 0px;
width:100%;
height:100%;
z-index: 1000;
}
#overlay { background-color: #222;}
/* must have these resets */
html, body{ height: 100%; padding: 0; margin: 0;}
/* code begins*/
.featured-video { height: 100%; width: 100%; }
.featured-video iframe {
height: 100%;
width: 100%;
margin-right: auto;
margin-left: auto;
vertical-align: middle;
}
#overlay i {
color: #999;
font-size: 48px;
margin: 10px;
}
html, body{ height: 100%; padding: 0; margin: 0;}
JS
function overlay() {
el = document.getElementById("overlay");
el.style.display = (el.style.display == "block") ? "none" : "block";
}