Remove the li if it is hidden, so for smaller sizes it works well