Im trying to build a registration form and right now the spacing/positioning is kinda whack.
How should I fix them to be in the same line/row?
symmetrical.
I added the code, and a photo of how it looks like.
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<form>
<!--First Name-->
<div class="mb-3 mt-3">
<label for="fname" class="form-label">First name:</label>
<input type="fname" class="form-control-xs" id="fname" placeholder="Enter name" />
</div>
<!--Last name-->
<div class="mb-3 mt-3">
<label for="lname" class="form-label">Lastname:</label>
<input type="lname" class="form-control-xs" id="lname" placeholder="Last name" />
</div>
<!--Email-->
<div class="mb-3 mt-3">
<label for="email" class="form-label">E-mail:</label>
<input type="email" class="form-control-xs" id="email" placeholder="Enter email" />
</div>
<!--Country-->
<div class="mb-3 mt-3">
<label for="city" class="form-label">City of residence:</label>
<input type="city" class="form-control-xs" id="city" placeholder="City" />
</div>
<!--Button-->
<input type="submit" value="Register" />
<!--mandatory check box-->
<input class='acb' type='checkbox' name='acheckbox[]' value='1' onclick='deRequire("acb")' required>By checking this box you agree to the
<!--TERMS OF USE-->
<a href="useragreement.html">user agreement</a>
<!--PARAGRAPH-->
<p>If you click the "Register" button, the form-data will be sent to the owner of the website.</p>
<p>Already have an account?</p>
<a href="../sign in/login.html"><button type="button">Sign In</button></a>
</form>
I want it to be in the same line/row symmetrical sorry for grammar mistakes.
2
Answers
You can check bootstrap documentation. It contains many examples. It also has an example for you problem. Anyway here is the answer.
Link for the documentation:
Bootstrap documentation
Use
display: grid
andgrid-template-columns: subgrid
: