I'm trying to put a rounded div in the centre of any size page and make it responsive both vertically and horizontally when resizing the browser.
So far, I've managed to put the div in the middle of a page but it is only horizontally responsive. I need to make it also vertically responsive if possible.
Could you please suggest something?
Here is the code and fiddle https://jsfiddle.net/6g2ccpar/
<div id="login">
<div class="login-box">
<h1 class="login-box__header">
Login
</h1>
<form class="login-box__form-usr-details" action="/somesearchaction" name="search" method="get">
<label for="user-email">Enter your email </label>
<input title="Enter user email" placeholder="Enter your email" name="email" id="user-email" type="text"></input>
<label for="user-password">Enter your password </label>
<input title="Enter user password" placeholder="Enter your password" name="password" id="user-password" type="text"></input>
<span class="forgot-pwd btn btn--white">Forgot password?</span>
<span class="submit btn btn--blue">Login</span>
</form>
</div>
</div>
#login{
background: red;
.login-box{
background: green;
width: 60%;
height: 60%;
overflow: auto;
margin: auto;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 9999;
border-radius: 50%;
&__header{
font-size: 20px
}
&__form-usr-details{
font-size:25px;
}
}
}