I am trying to center align my div containing login information on the webpage. The static values seem to work fine, but I am looking for a way to position it dynamically. Additionally, the background is only covering a strip with the height of the div...
Below is the code snippet:
.bold{
font-weight: bold
}
#login {
width: 300px;
margin-left: auto;
margin-right: auto;
margin-top: 15%;
background-color: white;
border-style: outset; <!--Just there to show the border-->
}
.background {
background-color: #f5f5f0;
min-height: 100%;
height: auto !important;
}
<div class=background>
<div class="well well-lg" id="login">
<h2>LOGIN</h2>
<form method="post" ng-submit="login()">
<input name="username" type="text" ng-model="username" placeholder="username"><br>
<input name="password" type="password" ng-model="password" placeholder="password"><br>
<input type="submit" value="Einloggen">
</form>
</div>
</div>