I have a website that includes a sliding overlay div which triggers when the user exits a specific area. To showcase this, I created a demonstration on jsfiddle.
<body class="overlay">
<input>
</body>
.overlay{
position: absolute;
opacity: ;
width: 100%;
height: 100%;
background-color: #373737;
}
Currently, adjusting the opacity affects the input fields and darkens them, which is not my intention. The overlay div properly displays over the elements as intended, but the issue lies in the visibility of input fields underneath it.
I understand that disabling window events to prevent clicking inside the input fields may seem like a solution, but users need access to interact with certain features, like closing the pop-up div.
I am looking for a way to attach the overlay to the body while ensuring that all input fields below are hidden. Despite my efforts in researching, I have not found an exact solution yet.
I am only using jQuery and CSS in my project, so any suggestions should stay within those parameters. Thank you!