For some reason there are horizontal gaps between the <li>
elements in this example, and I simply cannot fathom why they are there.
Markup
<ul>
<li>
Stuff
</li>
<li>
Things
</li>
<li>
/dev/null
</li>
<li>
Use Jquery!
</li>
</ul>
CSS
ul {
margin:0;
padding:0;
height:50px;
}
ul > li {
display:inline-block;
background-color:silver;
height:100%;
width:20%;
max-width:300px;
list-style-type:none;
text-align:center;
line-height:50px;
}
What is causing these gaps?
ul {
margin:0;
padding:0;
height:50px;
}
ul > li {
display:inline-block;
background-color:silver;
height:100%;
width:20%;
max-width:300px;
list-style-type:none;
text-align:center;
line-height:50px;
}
<ul>
<li>
Stuff
</li>
<li>
Things
</li>
<li>
/dev/null
</li>
<li>
Use Jquery!
</li>
</ul>