body {
margin: 0;
}
.container div {
display:inline-block;
width:20%;
box-sizing: border-box;
text-align:center;
background-color:green;
padding: 0;
border-width: 0;
}
.container a {
text-decoration: none;
}
<div class="container">
<div class="first"><a href="http://google.com">Google</a></div>
<div class="second"><a href="http://google.com">Google</a></div>
<div class="third"><a href="http://google.com">Google</a></div>
<div class="fourth"><a href="http://google.com">Google</a></div>
<div class="fifth"><a href="http://google.com">Google</a></div>
</div>
First of all sorry if this question is a little bit stupid but , what makes it push the last link out of the line even though I've made the width 20% ? I've tried setting padding to 0 , setting margin to 0 , but nothing seems to work. Is it my browser mistake for displaying it uncorrectly?