I have a series of 8 divs I'm aligning horizontally within a parent container. Each child div is 12.5% so when laid out across the page this will add up to a total of 100% of the parent. The final div is being pushed below the others because there isn't enough room and this seems to be caused by the mystery whitespace on the right-side of each div.
Does anyone know what is causing this whitespace and more importantly, how to remove it?
body {margin: 0; padding: 0;}
#main-content {
width: 100%;
height: 100%;
position: relative;
}
.linebox{
margin: 0; padding: 0;
width: 12.5%;
display: inline-block;
background: orange;
border-right: 1px solid black;
box-sizing: border-box;
height: 100vh;
position: relative;
}
<main id="main-content">
<div class="linebox" id=linebox-1></div>
<div class="linebox" id=linebox-2></div>
<div class="linebox" id=linebox-3></div>
<div class="linebox" id=linebox-4></div>
<div class="linebox" id=linebox-5></div>
<div class="linebox" id=linebox-6></div>
<div class="linebox" id=linebox-7></div>
<div class="linebox" id=linebox-8></div>
</main>