I checked several answers to the problem with the full height of the overlay, but there are no correct answers.
How do you overlay to cover the entire page, not part of it, which is annoying. And I make the height equal to 100%.
The overlay is made in jquery, but obviously css can be made in the css file. But for the sake of simplicity ...:
$('.overlay-test').click(function(e){
$('#ovelay-box').load('overlay.html', function(response){
$('#ovelay-box').css({
"opacity": 0.5,
"background": "#333",
"height": $('body').height(),
"position": "absolute",
"width": "100%",
"top": 0,
"color": "#333",
"font-size": "26px",
"font-weight": "bold"
});
$('.overlay').addClass('col-12-box').css({
"width": "770px",
"left": "129px",
"background": "#fff",
"padding": "20px",
"position": "absolute",
"top": "50px"
});
});
e.preventDefault();
});
Shaoz source
share