Reputation: 1
<ul>
<li>test 1</li>
<li>test 2</li>
<li>test 3</li>
<li>test 4</li>
<li>test 5</li>
<li>test 6</li>
</ul>
*{
margin:0;
padding:0;
box-sizing:border-box;
}
ul{
width:100%;
}
li{
display:inline-block;
width:50%;
}
I want that
li
has this behavior:
But this way, i have that put li
with
equal 49%
.
Have some hack? With div
under div
i use font-size: 0
but, with li
not is possible put equal 0
.
Upvotes: 0
Views: 41
Reputation: 4095
You can use flex to solve the problem. Here is css for same html file:
*{
margin:0;
padding:0;
box-sizing:border-box;
}
ul{
width:100%;
display: flex;
flex-wrap: wrap;
}
li{
display:inline-block;
width:50%;
}
Upvotes: 0