I'm struggling to incorporate their suggestions into my design. How can I align my label to the left of my input field on the same line? Also, I'm a beginner in coding so please excuse any mistakes in my code:
body {
background-color: #f5f5f5;
}
.rng_box {
background-color: white;
width: 70%;
max-width: 800px;
left: 50%;
top: 460px;
border-radius: 20px;
padding: 20px;
position: absolute;
transform: translate(-50%, -50%);
box-shadow: 0px 2px 6px 2px #E5E5E5;
border: solid 3px #DEDEDE;
}
.title {
text-align: center;
}
.form-control {
width: 180px;
height: 30px;
margin-left: 45px;
}
.btn {
margin: 1px;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3b5954544f484f495a4b7b0f150e1508">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<div class="rng_box">
<h1 class="title">Random Number Generator</h1>
<div>
<form id="minAndMax">
<label for="min">Minimum:</label><br>
<input type="number" id="min" name="min" class="form-control" value="1">
<label for="max">Maximum:</label><br>
<input type="number" id="max" name="max" class="form-control" value="10">
<br>
<div class="buttons">
<button type="button" class="btn btn-success" onclick="generateRN()">Generate 🎉</button>
<button type="button" class="btn btn-danger" onclick="ignoreFields()">Ignore Fields</button>
<button type="reset" class="btn btn-primary">Clear</button>
</div>
</form>
</div>
<hr>
<h1 id="rng_answer">0</h1>
</div>