I am looking to create a sign-up form that greys out the background page and places the form in the center using an iframe. Here is the code for achieving this:
code:
<div id="cover5">
<iframe name="warning" src="SignIn.php" id="warning" style="position: relative; height: 250px;">
</iframe>
</div>
css:
#cover5 {
position:absolute;
top:0px;
left:0px;
overflow:hidden;
display:none;
width:100%;
height:100%;
background-color:gray;
text-align:center;
opacity: 0.5;
}
#warning {
border-radius: 20px;
top: 150px;
margin:auto;
position:relative;
width:600px;
height:fit-content;
background-color:white;
color:black;
padding:10px;
border: 5px solid #003366;
opacity: 1;
}
I am trying to achieve low opacity for the cover (background blur) while keeping the iframe clear, however changing the div's opacity also affects the iframe. How can I solve this issue?