I want "Login" & "Register" to be aligned with the height of the top, look at the example below for more clarity
And I would like to be like this
I also use Bootstrap 4 but not for what I would like to do, I read somewhere that it is better to do it yourself without using Bootstrap.
Here is the code I used:
css:
.content{
height: calc(100vh - 100px);
width: 100%;
display: flex;
align-items: center;
overflow: hidden;
}
.content > div{
padding:10em;
flex: 1;
width: 100%;
}
html:
<div class="content">
<div class="content-one">
<h1>Login</h1>
<form method="post">
<div class="form-group">
<label>Username</label>
<div class="control">
<input type="text" class="form-control" name="username" placeholder="Username" />
</div>
</div>
<div class="form-group">
<label>Password</label>
<div class="control">
<input type="password" class="form-control" name="password" placeholder="Password" />
</div>
</div>
<div class="form-group">
<input value="Log in" type="submit" class="btn btn-red fw-4" />
</div>
</form>
</div>
<div class="content-two">
<h1>Register</h1>
<form action="/register" method="post">
<div class="form-group">
<label>Username</label>
<div class="control">
<input type="text" class="form-control" name="username" placeholder="Username" />
</div>
</div>
<div class="form-group">
<label>Email</label>
<div class="control">
<input type="text" class="form-control" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<label>Password</label>
<div class="control">
<input type="password" class="form-control" name="password" placeholder="Password" />
</div>
</div>
<div class="form-group">
<label>Are you a robot ?</label>
<div class="control">
<div class="g-recaptcha" data-sitekey="6Le18_YZAAAAAPZHps-_4XB3U6yTXh0dMFsJdJpF"></div>
</div>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
<p class="form-check-label" for="defaultCheck1">
I have read and agree <a href="#">the terms of use</a>.
</p>
</div>
</div>
<div class="form-group">
<input value="Register" type="submit" class="btn btn-grey" />
</div>
</form>
</div>
</div>
If it can be done using Bootstrap 4, that's fine with me too.