So I'm trying to keep my div centred when a page resizes. Like this for example https://accounts.spotify.com/en/login
But when I resize it currently resizes the whole div. Here's the relevant code:
<div id = "wrapper">
<div id = "formwrap">
<form action = "./PHP/main_login.php" method = "post">
<input type = "text" name = "email" id = "email" placeholder = "Email"/><br>
<input type = "password" name = "password" id = "password" placeholder = "Password"/><br>
<input type = "submit" name = "submitlogin" id = "submitbut" value = "Login">
</form>
</div>
</div>
#wrapper{
padding-left: 30%;
padding-right: 30%;
float: center;
}
#formwrap{
width:100%;
background-color: #383838;
float: center;
margin: 0 auto;
}
Essentially I'm trying to keep the div and the contents within it the same size while decreasing the horizontal screen size until I call a media query. All help much appreciated