These divs have display inline block, height and width of 50%, and no margin but they keep falling from the container. What's going wrong and how can I fix it?
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.gameboard {
border: 5px solid black;
width: 300px;
height: 300px;
display: flex;
flex-wrap: wrap;
}
.box {
height: 50%;
width: 50%;
border: 1px solid black;
display: inline-block;
margin: 0;
}
<div class="gameboard">
<div class="box left"></div>
<div class="box right"></div>
<div class="box left"></div>
<div class="box right"></div>
</div>