- Joined
- Aug 16, 2022
- Messages
- 53
- Reaction score
- 2
Hi Everybody,
How do I adjust the "numericDisplay" to be closer to the Question label?
How do I adjust the "input type="number" to be closer to the Answer label?
I have no idea what attribute to play with.
JavaScript:
<!--This section is a security stage: Vistor will see two randomly generated numbers
between 1 and 25 and be asked to input the sum of those two numbers-->
<div class="row">
<div class="col-md-3 col-sm-6 spread">
<h4>Question:</h4>
</div>
<div class="col-md-3 col-sm-6 displayBox" id="numericDisplay"></div>
<script>
var firstNumb = Math.floor(Math.random() * 25) + 1;
var secondNumb = Math.floor(Math.random() * 25) + 1;
var secretNumber = firstNumb + secondNumb;
var display1 = document.getElementById("numericDisplay");
display1.innerHTML = "<h5>"+firstNumb+" + "+secondNumb+"</h5>";
</script>
<div class="col-md-3 col-sm-6 spread">
<h4>Answer:</h4>
</div>
<div class="col-md-3 col-sm-6">
<input type="number" class="form-control" id="nEntry" name="nEntry" size="1" min="2" max="50" required="required">
</div>
</div>
How do I adjust the "input type="number" to be closer to the Answer label?
I have no idea what attribute to play with.