I'm creating my own modal, here's my CSS:
.modal{
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
z-index: 999;
.modal-content{
margin: 60px auto;
background-image:url('/static/img/background-modal.jpg');
width: 700px;
height: 700px;
.box-shadow(0 10px 2px #999);
}
}
And the HTML:
<div class="modal">
<div class="modal-content">
My Modal
</div>
</div>
.modal refers to the greyed out background and .modal-content refers to the box that pops up.
The problem is that the greyed background only covers the browser window, when I scroll down to see the rest of my modal box, the greyed background stops and I can see my pages content.
I can fix this with a fixed position, but then you can not see the entire content of .model-content.