How do I center the login form in between the header and footer? It is right now touching the header but I need it to be centered in between the header and the footer. As you can see below, I tried setting the width and height of the child element (which is the container) of the parent element (which in this case is the tag. Any help would be wonderful. I am new to coding, and am looking to learn the right way to do things. Thank you!! I tried following this link: How do I make a div full screen? but was not successful.
.container {
width: 100%;
height: 100%;
}
@media only screen and (max-width: 375px) {
#col-6 {
display: flex;
margin: 0;
padding: 0;
}
#login {
font-size: .95em;
padding-top: 6px;
}
#username::placeholder {
font-size: .75em;
}
#password::placeholder {
display: none;
font-size: .75em;
}
}
@media only screen and (max-width: 412px) {
#col-6 {
display: flex;
margin: 0;
padding: 0;
}
#login {
font-size: .95em;
padding-top: 6px;
}
#username::placeholder {
font-size: .75em;
}
#password::placeholder {
font-size: .74em;
}
}
<div class="container">
<div class="row">
<div class="col-6 mx-auto" id="col-6">
<div class="card" id="card">
<div class="card-header">
<p class="h3" id="login">LOGIN</p>
</div>
<div class="card-body">
<form class="form" role="form" autocomplete="off" id="loginForm" method="POST">
<div class="form-group mx-sm-3 mb-2">
<label for="username">Username</label>
<input type="text" class="form-control" id="username" placeholder="" required>
</div>
<div class="form-group mx-sm-3 mb-2">
<label for="password">Password</label>
<input type="password" class="form-control" id="password" placeholder=""
required>
</div>
<div class="col-12 text-center">
<button type="button" class="btn btn-primary btn-lg btn-danger" id="button" (click)="onClickSubmitButton()">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>