White space appears because it is present in your HTML code.
The closing tag </li> is in a new line. Carriage returns are considered spaces in HTML, and so you have a space at the end of the list item.
The reason it appears is because you use display:inline . When usign is inline (or inline-block ), whitespace matters because inline means "treat this element as plain text" and therefore any free space is considered an intentional part of the text.
The best way to get rid of this is to simply put the close tag </li> in the same line as the rest of the text so that there are no spaces.
There are many other ways, but most of them involve pretty hacked CSS; just closing the space is the easiest option.
The next best alternative is to switch to using float:left instead of display:inline . This will also affect the problem, but it will change the way you render everything that requires you to make other changes to the CSS to compensate.
source share