The problem has its origins slightly earlier. You need to move the HR tag immediately before the LIs to outside of their UL tag so that the validator (and browsers) can properly associate the LIs with their enclosing UL.