When my website loads, I am using reveal.js to display some terms and conditions. However, the text is quite lengthy and causes the main scrollbar of the website to extend.
What I would like to do is add a scrollbar to the modal window so that users can scroll through the content within the window without affecting the main scrollbar of the website.
Here is my code:
HTML:
<a href="#" class="big-link" data-reveal-id-terms="myModal-terms"></a>
<div id="myModal-terms" class="reveal-modal-terms xlarge"> Mytext </div>
Javascript:
$(document).ready(function() {
$('#myModal-terms').reveal({
animation: 'fadeAndPop',
animationspeed: 300,
closeonbackgroundclick: false,
dismissmodalclass: 'close-reveal-terms'
});
});
CSS:
.reveal-modal-terms {
visibility: hidden;
top: 30px;
left: 50%;
margin-left: -300px;
width: 485px;
background: #FFFFFF url(modal-gloss.png) no-repeat -200px -80px;
position: absolute;
z-index: 101;
padding: 30px 40px 34px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0 0 10px rgba(0,0,0,.4);
-webkit-box-shadow: 0 0 10px rgba(0,0,0,.4);
-box-shadow: 0 0 10px rgba(0,0,0,.4);
}
If I include overflow: scroll;
in the CSS, it does not seem to work as it still uses the main website's scrollbar...
Best regards,