There seems to be an error in calculating the multi column css property present in all browsers I checked (recent Chrome, IE11 and Firefox). If you have 9 items in your list and try to split it into 4 columns, the last column is always empty.
Are there any workarounds, something that divides it into 3/2/2/2? Thank you in advance.
ul { -moz-column-count: 4; -webkit-column-count: 4; column-count: 4; background-color: gray; } li { background-color: tomato; }
<ul> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li> </ul>
source share