Problem with list and css display inline-block

Some days ago i found a problem with html list, each element has a 4px space between li element. The problem was with display: inline-block on li elements. When I set to float: left everything was correct. I googled and find some solutions. I choosen the best solution and removed a gaps beetween li elements in html code. I know that code don't look nice, but when this will be fixed everything will be working. Solution with negative margin could be tricky in future.