I'm looking to create a layout with 6 divs positioned relatively as clickable buttons - 3 on top and 3 on the bottom, each containing specific text. However, I've run into an issue where longer words cause some of the buttons to shift position. I suspect this problem is related to the "display: inline-block" property.
Here is the HTML:
<div class="Box_parent">
<a><div id="Box_button"> <div class="box_text"> TEST </div> </div></a>
<a><div id="Box_button"> <div class="box_text"> TEST </div> </div></a>
<a><div id="Box_button"> <div class="box_text"> REALLY REALLY REALLY LONG TEST </div> </div> </a>
<a><div id="Box_button"> <div class="box_text"> TEST </div> </div> </a>
<a><div id="Box_button"> <div class="box_text"> REALLY REALLY REALLY LONG TEST </div> </div> </a>
<a><div id="Box_button"> <div class="box_text"> TEST </div> </div> </a>
</div>
And here is the CSS:
#Box_button{
height:300px;
width:300px;
background-color:#4286f4;
margin:15px 15px;
display: inline-block;
}
.box_text{
font-family:Arial;
color:white;
font-size:30px;
}
.Box_parent{
position:relative;
text-align:center;
max-width:1300px;
margin:auto;
margin-top:130px;
vertical-align: bottom;
}