I'm currently working on a simple login system and I have some Front-End difficulties. I'm trying to make a center-based login form with some inputs and a button. So basically right now I was able to make few inputs inside the center, but when I tried adding a button, then I got result like this:
Note: I need the button to be in the center of the form. Also, am I doing the form in the center correctly?
My HTML code:
<div class="container">
<h1 class="page-header text-center apie_m_cga">~ Support Desk ~</h1>
<hr>
<div class="row justify-content-center">
<div class="form-group col-md-3 col-md-offset-7 align-center ">
<br>
<input type="text" id="inputUsername6" placeholder="Username" class="form-control mx-sm-3 text-center">
<br>
<input type="password" id="inputPassword6" placeholder="Password" class="form-control mx-sm-3 text-center">
<br>
<button type="button" class="btn btn-primary btn-lg">Login</button>
</div>
</div>
<br>
</div>
add text-center class to the div that contain form-group class:
<div class="container">
<h1 class="page-header text-center apie_m_cga">~ Support Desk ~</h1>
<hr>
<div class="row justify-content-center ">
<div class="form-group col-md-3 col-md-offset-7 align-center text-center">
<br>
<input type="text" id="inputUsername6" placeholder="Username" class="form-control mx-sm-3 text-center">
<br>
<input type="password" id="inputPassword6" placeholder="Password" class="form-control mx-sm-3 text-center">
<br>
<button type="button" class="btn btn-primary btn-lg">Login</button>
</div>
</div>
<br>
</div>
Just add a text-align: center; to your form-group
.form-group {
text-align: -webkit-center;
text-align: center;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container">
<h1 class="page-header text-center apie_m_cga">~ Support Desk ~</h1>
<hr>
<div class="row justify-content-center">
<div class="form-group col-md-3 col-md-offset-7">
<br>
<input type="text" id="inputUsername6" placeholder="Username" class="form-control mx-sm-3 text-center">
<br>
<input type="password" id="inputPassword6" placeholder="Password" class="form-control mx-sm-3 text-center">
<br>
<button type="button" class="btn btn-primary btn-lg">Login</button>
</div>
</div>
<br>
</div>
You just need to add .text-center add on parent DIV
<div class="container">
<h1 class="page-header text-center apie_m_cga">~ Support Desk ~</h1>
<hr>
<div class="row justify-content-center">
<div class="form-group col-md-3 col-md-offset-7 align-center text-center">
<br>
<input type="text" id="inputUsername6" placeholder="Username" class="form-control mx-sm-3 text-center">
<br>
<input type="password" id="inputPassword6" placeholder="Password" class="form-control mx-sm-3 text-center">
<br>
<button type="button" class=" btn-primary btn-lg">Login</button>
</div>
</div>
<br>
</div>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
I'll suggest you make the button the same length with the input fields, it'll make the form look better.
Try this:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<div class="container">
<h1 class="page-header text-center apie_m_cga">~ Support Desk ~</h1>
<hr>
<div class="row justify-content-center">
<div class="form-group col-md-3 col-md-offset-7 align-center ">
<br>
<input type="text" id="inputUsername6" placeholder="Username" class="form-control text-center">
<br>
<input type="password" id="inputPassword6" placeholder="Password" class="form-control col-12 text-center">
<br>
<button type="button" class="btn col-12 btn-primary">Login</button>
</div>
</div>
<br>
</div>
I think the class of your button "btn-lg" is influenced in position. Basically there is no any special errors on your script except for it.
Please remove it in class and try again
Related
I am using bootstrap V5 and i wanted to center the login button in the div and i am using mx-auto and also tried text-center but none of this is working.
Where am i getting wrong.
<div className='container my-auto w-50' style={{backgroundColor:"#E8D2A6"}}>
<div className="text-center my-4" style={{fontSize:"2.5rem"}}>Login</div>
<div className="form-group row">
<label htmlFor='userid' className='col-3 col-form-label' style={{fontSize:"1.3rem"}}>Enter UserId:</label>
<div class="col-8">
<input type="text" id="userid" className='form-control' placeholder='Enter user id'/>
</div>
</div>
<div className="form-group row my-3">
<label htmlFor='userid' className='col-3 col-form-label' style={{fontSize:"1.3rem"}}>Enter Password:</label>
<div class="col-8">
<input type="text" id="userid" className='form-control' placeholder='Enter Password'/>
</div>
</div>
<button type='button' className="mx-auto btn btn-danger btn-block text-center">Login</button>
</div>
Try this:
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons#1.10.2/font/bootstrap-icons.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
<div class='container my-auto w-50' style={{background-color:"#E8D2A6"}}>
<div class="text-center my-4" style={{fontSize:"2.5rem"}}>Login</div>
<div class="form-group row">
<label htmlFor='userid' class='col-3 col-form-label' style={{fontSize:"1.3rem"}}>Enter UserId:</label>
<div class="col-8">
<input type="text" id="userid" class='form-control' placeholder='Enter user id'/>
</div>
</div>
<div class="form-group row my-3">
<label htmlFor='userid' class='col-3 col-form-label' style={{fontSize:"1.3rem"}}>Enter Password:</label>
<div class="col-8">
<input type="text" id="userid" class='form-control' placeholder='Enter Password'/>
</div>
</div>
<div class="form-group row">
<button type='button' class="w-auto mx-auto btn btn-danger btn-block text-center">Login</button>
</div>
</div>
I want to align a form in the middle of a container. Then set input bar to be as wide as half of that container. Here is my code.
<div id="sub" class="col-6 d-flex justify-content-center">
<div class="d-flex">
<form id="form" action="https://www.freecodecamp.com/email-submit.">
<div class="form-group">
<input id="email" class="form-control text-center" type="email" placeholder="Enter your email">
</div>
<div class="d-flex justify-content-center pt-3">
<input id="submit" class="btn btn-primary" type="submit">
</div>
</form>
</div>
</div>
Can you try to put your code into row?
<div class="container">
<div class="row d-flex justify-content-center">
<div id="sub" class="col-6">
<div class="d-flex">
<form id="form" action="https://www.freecodecamp.com/email submit.">
<div class="form-group">
<input id="email" class="form-control text-center"
type="email" placeholder="Enter your email">
</div>
<div class="d-flex justify-content-center pt-3">
<input id="submit" class="btn btn-primary" type="submit">
</div>
</form>
</div>
</div>
<div>
</div>
This should help.
#sub{
width:100%;
border:1px solid #ccc;
height:400px;
align-items:center;
}
.form-wrapper{
width:50%;
}
input{
width:100%;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<div id="sub" class="d-flex justify-content-center align-items-center">
<div class="form-wrapper">
<form id="form" action="https://www.freecodecamp.com/email-submit.">
<div class="form-group">
<input id="email" class="form-control text-center" type="email" placeholder="Enter your email">
</div>
<div class="d-flex justify-content-center pt-3">
<input id="submit" class="btn btn-primary" type="submit">
</div>
</form>
</div>
</div>
I'm working on a Bootstrap 4 HTML page. I put a button in a panel header:
I need to put the button (and the title) in the middle of the panel header. How can I achieve this goal?
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="container p-4 ">
<div class="card">
<div class="card-header">
<p class="float-left display-4">Administrator</p>
<a href="#" class="btn btn-primary float-right" style="align-items: center" routerLink="../list" role="button">
<i class="fa fa-arrow-left"></i> Indietro</a>
</div>
<div class="card-body">
<form>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<div class="form-group">
<label for="displayName">Display name:</label>
<input type="displayName" class="form-control" id="displayName">
</div>
<button type="submit" class="btn btn-primary float-right">Salva</button>
</form>
</div>
</div>
</div>
Thanks
Try using display: flex; for your card header which is available in bootstrap and also instead of using float-right you can use ml-auto to move the button to the right (With the use of flex there is no need to use float properties). Hope this code helps
<!--
Bootstrap docs: https://getbootstrap.com/docs
-->
<div class="container p-4 ">
<div class="card">
<div class="card-header d-flex flex-row align-items-center">
<p class="float-left display-4">Administrator</p>
<a href="#" class="btn btn-primary ml-auto" style="align-items: center" routerLink="../list" role="button">
<i class="fa fa-arrow-left"></i> Indietro</a></div>
<div class="card-body">
<form>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<div class="form-group">
<label for="displayName">Display name:</label>
<input type="displayName" class="form-control" id="displayName">
</div>
<button type="submit" class="btn btn-primary float-right">Salva</button>
</form>
</div>
</div>
</div>
Just add display flex to your card-header class, then align-items: center
.card-header {
padding: .75rem 1.25rem;
margin-bottom: 0;
background-color: rgba(0,0,0,.03);
border-bottom: 1px solid rgba(0,0,0,.125);
display: flex;
justify-content: space-between;
align-items: center;
}
So I have a form and I'm using the Bootstrap framework and on every input type of this form I want to have text on the left showing what the input is for but what happens the text gets above the input like this:
Picture of how forms looks like right now:
<div class="container">
<br>
<center> <h3> Jongere toevoegen </h3> </center>
<br>
<?php echo form_open('index.php/Addjongere/Add_jongere'); ?>
<form>
<div class="form-group row">
<label>Roepnaam:</label>
<input class="form-control" name="roepnaam" id="roepnaam" placeholder="Roepnaam" type="text">
</div>
<div class="form-group row">
<label>Tussenvoegsel:</label>
<input class="form-control" name="tussenvoegsel" id="tussenvoegsel" placeholder="Tussenvoegsel" type="text">
</div>
<div class="form-group row">
<label>Achternaam:</label>
<input class="form-control" name="achternaam" id="achternaam" placeholder="Achternaam" type="text">
</div>
<div>
<button class="btn btn-primary" name="Add_jongere" >Toevoegen</button>
</div>
</form>
</div>
Does anyone know what I can do?
Any kind of help is appreciated
Is this what you are trying to get? Remove the class="form-inline" from your form and to your form-group divs add class row.
I also added a container around the form to keep it in a good size.
edit
I forgot to add class="col-sm-4" to the labels and class="form-control col-sm-8" to the inputs. So they were not next to eachother.
label{
text-align: center;
}
h3, .container button{
display: block;
margin: 0 auto;
text-align: center;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<div class="container">
<h3> Jongere toevoegen </h3>
<br>
<form>
<div class="form-group row">
<label class="col-sm-4">Roepnaam:</label>
<input class="form-control col-sm-8" name="roepnaam" id="roepnaam" placeholder="Roepnaam" type="text">
</div>
<div class="form-group row">
<label class="col-sm-4">Tussenvoegsel:</label>
<input class="form-control col-sm-8" name="tussenvoegsel" id="tussenvoegsel" placeholder="Tussenvoegsel" type="text">
</div>
<div class="form-group row">
<label class="col-sm-4">Achternaam:</label>
<input class="form-control col-sm-8" name="achternaam" id="achternaam" placeholder="Achternaam" type="text">
</div>
<div>
<button class="btn btn-primary" name="Add_jongere">Toevoegen</button>
</div>
</form>
</div>
You can put the entire form inside a responsive col, and adjust the label/input widths accordingly...
https://www.codeply.com/go/vdQSHJUalP
<div class="container">
<div class="row">
<form class="col-12 col-md-8 mx-auto">
<div class="form-group row">
<label class="col-5 col-sm-3 text-truncate">Roepnaam:</label>
<input class="form-control col" name="roepnaam" id="roepnaam" placeholder="Roepnaam" type="text">
</div>
<div class="form-group row">
<label class="col-5 col-sm-3 text-truncate">Tussenvoegsel:</label>
<input class="form-control col" name="tussenvoegsel" id="tussenvoegsel" placeholder="Tussenvoegsel" type="text">
</div>
<div class="form-group row">
<label class="col-5 col-sm-3 text-truncate">Achternaam:</label>
<input class="form-control col" name="achternaam" id="achternaam" placeholder="Achternaam" type="text">
</div>
<div class="form-group row">
<div class="col-12 text-center">
<button class="btn btn-primary" name="Add_jongere">Toevoegen</button>
</div>
</div>
</form>
</div>
</div>
try this:
.formcontrol {width: 50%; float:right;}
I have header tag inside the header I have one container for logo and one container for login form. I want my logo to be left and my login form to be position top right angle, but when I set float-left to the logo container and float-right to the login form they break. I've made sure the containers to be enough sized to fit in, but they still break.
Here is my code:
<header class="bg-inverse text-white col-sm-12" style="border: 1px solid blue">
<div id="logo" class="col-sm-8"style="border:1px solid red">
<h1 class="font-weight-bold">Somelogo</h1>
</div>
<div id="login-form" class="col-sm-3">
<form class="" style="border: 1px solid blue">
<div class="form-group mb-0">
<label for="username">Username</label>
<input type="text" class="form-control form-control-sm" id="username">
</div>
<div class="form-group mb-1">
<label class="pt-1 mb-0" for="Password" style="border: 1px solid blue">Password</label>
<input type="password" class="form-control form-control-sm" id="password">
</div>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">register</button>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">login</button>
</form>
</div>
</header>
This is how to looks like without setting a position Picture 1
This is how it looks when I set float:left to the div with id logo and float:right to the div with id login-formPicture 2
This is with only setting the div with id login-form to float-rightPicture 3
PS: I'm trying to use only bootstrap 4. And please explain what is the problem, why is this happening.
The problem is that you aren's using the Bootstrap grid correctly. This is a common beginner mistake.
Bootstrap rows and columns are designed to work together.
That means: You cannot nest a Bootstrap column directly into another Bootstrap column. If you do, you'll inevitably run into issues as is the case here.
Solution:
When nesting anything inside a Bootstrap column, first put a div (or another suitable HTML element) with the class .row into that column and then put a div with the class .col into that row div.
WRONG:
<div class="container">
<div class="row">
<div class="col">
<div class="col"></div>
</div>
</div>
</div>
RIGHT:
<div class="container">
<div class="row">
<div class="col">
<div class="row">
<div class="col"></div>
</div>
</div>
</div>
</div>
This option would also work fine:
<div class="container">
<div class="row">
<div class="col">
</div>
</div>
<div class="row">
<div class="col">
</div>
</div>
</div>
I suspect the following is the layout you wanted to create:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<div class="container-fluid">
<div class="row">
<header class="bg-inverse col-sm-12" style="border: 1px solid blue">
<div class="row">
<div id="logo" class="col-sm-8" style="border:1px solid red">
<h1 class="font-weight-bold">Somelogo</h1>
</div>
<div id="login-form" class="col-sm-3 offset-sm-1">
<form class="" style="border: 1px solid blue">
<div class="form-group mb-0">
<label for="username">Username</label>
<input type="text" class="form-control form-control-sm" id="username">
</div>
<div class="form-group mb-1">
<label class="pt-1 mb-0" for="Password" style="border: 1px solid blue">Password</label>
<input type="password" class="form-control form-control-sm" id="password">
</div>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm mb-2 mb-sm-0">register</button>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">login</button>
</form>
</div>
</div>
</header>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
Note:
I had added the .container-fluid class and removed the .text-white class in the code snippet above.
P.S. I'm adding another version here that I think is better than the previous but it really depends on what you actually want. Here it is:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<header class="bg-inverse" style="border: 1px solid blue">
<div class="container">
<div class="row" style="border: 1px solid blue">
<div id="logo" class="col-sm-8" style="border:1px solid red">
<h1 class="font-weight-bold">Somelogo</h1>
</div>
<div id="login-form" class="col-sm-4 col-lg-3 offset-lg-1">
<form class="" style="border: 1px solid blue">
<div class="form-group mb-0">
<label for="username">Username</label>
<input type="text" class="form-control form-control-sm" id="username">
</div>
<div class="form-group mb-1">
<label class="pt-1 mb-0" for="Password" style="border: 1px solid blue">Password</label>
<input type="password" class="form-control form-control-sm" id="password">
</div>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm mb-2 mb-sm-0">register</button>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">login</button>
</form>
</div>
</div>
</div>
</header>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
You can try the following solution, using the flex utilities of Bootstrap 4:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" rel="stylesheet"/>
<header class="bg-dark text-white col-sm-12 d-flex justify-content-between align-items-center" style="border: 1px solid blue">
<div id="logo" class="col-sm-8" style="border:1px solid red">
<h1 class="font-weight-bold">Somelogo</h1>
</div>
<div id="login-form" class="col-sm-3">
<form style="border: 1px solid blue">
<div class="form-group mb-0">
<label for="username">Username</label>
<input type="text" class="form-control form-control-sm" id="username">
</div>
<div class="form-group mb-1">
<label class="pt-1 mb-0" for="Password">Password</label>
<input type="password" class="form-control form-control-sm" id="password">
</div>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">register</button>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">login</button>
</form>
</div>
</header>
Another solution using .container and .row:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" rel="stylesheet"/>
<header class="container bg-dark text-white col-sm-12" style="border: 1px solid blue">
<div class="row">
<div id="logo" class="col-sm-8 align-self-center mr-auto" style="border:1px solid red">
<h1 class="font-weight-bold">Somelogo</h1>
</div>
<div id="login-form" class="col-sm-3">
<form style="border: 1px solid blue">
<div class="form-group mb-0">
<label for="username">Username</label>
<input type="text" class="form-control form-control-sm" id="username">
</div>
<div class="form-group mb-1">
<label class="pt-1 mb-0" for="Password">Password</label>
<input type="password" class="form-control form-control-sm" id="password">
</div>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">register</button>
<button type="submit" class="btn btn-primary col-sm-5 btn-sm">login</button>
</form>
</div>
</div>
</header>