Active link class on mobile

I have just set up an active class for the navigation, which is something I rarely do and it works, but whereas it only covers the word on desktop it covers the entire line on mobile and I am wondering if there is a way to have it behave in the same way on mobile?