Instead of using border-right: 0;
you should use border-right-width: 0;
and for the :last-child
selector, you need to use
.menu li:last-child {
border-top-right-radius: 5px;
border-right-width: 1px;
}
The issue is that when you use border-right: 0;
it will reset the size, type and the color as well, so even if you use border-right-width: 1px;
only, it won't work, so you need to use border-right-width: 0;
for the .menu li
as well.