HTML
<div class="overlay" style="display:none;"></div>
CSS:
.overlay{
position:absolute;
width:100%;
height:100%;
background-color:#000000;
filter:alpha(opacity=60);
opacity:0.6;
-moz-opacity:0.6;
z-index:100;
top:0px;
}
JS:
$(".overlay").toggle();
Effect:
A layer has been added above the entire website, preventing user interaction.
Problem:
When a scrollbar appears due to excess content, the overlay does not automatically adjust its height as shown in the image.
How can I ensure the absolute div expands accordingly?