I currently have the following code snippet:
<div class="button-box col-lg-12">
<a href="mylink.php" class="btn btn-info" role="button">About Us</a>
<a href="mylink.php" class="btn btn-info" role="button">Our Products</a>
</div>
While this code helps to display two buttons, how can I dynamically make the buttons occupy 50% of the container width each?
For example, if I add 4 <a> tags in the code:
<div class="button-box col-lg-12">
<a href="mylink.php" class="btn btn-info" role="button">About Us</a>
<a href="mylink.php" class="btn btn-info" role="button">Our Products</a>
<a href="mylink.php" class="btn btn-info" role="button">About Us</a>
<a href="mylink.php" class="btn btn-info" role="button">Our Products</a>
</div>
It would look like this:
<div class="button-box col-lg-12">
<a href="mylink.php" class="btn btn-info" role="button">About Us</a>
<a href="mylink.php" class="btn btn-info" role="button">Our Products</a>
</div>
<div class="button-box col-lg-12">
<a href="mylink.php" class="btn btn-info" role="button">About Us</a>
<a href="mylink.php" class="btn btn-info" role="button">Our Products</a>
</div>
Is it possible to achieve this within one container (button-box)?
Extra CSS I added:
.button-box {
text-align:center;
margin-top:20px;
}