I need help with aligning two
<input type="text">
boxes on my form. Currently, I have a dropdown button and one text input in one row, and another text input in the second row (refer to the screenshot below). How can I ensure that the "Choice 2" box is positioned right below the "Choice 1" box for better alignment? Thank you.
https://i.sstatic.net/ORvhF.png
This is the HTML code I am currently using:
<div class="container">
<div class="dropdown">
<button class="btn btn-info dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
2
<span class="caret"></span>
</button>
<ul id="list" class="dropdown-menu dropdown-info" aria-labelledby="dropdownMenu1">
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
</ul>
<input type="text" name="" value="" placeholder="Choice 1"> <br>
</div>
<div class="container">
<input type="text" name="" value="" placeholder="Choice 2">
</div></div>
Here is the CSS style associated with it:
.container {padding: 1% 20%;
margin: auto;
text-align: center;}
body {
background-color: #b6e6bd;
line-height: 1.6;
}
Can anyone provide guidance on how to accurately stack the "Choice 1" and "Choice 2" boxes, both represented by
<input type="text">
, directly above and below each other? Any assistance would be greatly appreciated. Thank you.