Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Need help with a menu bar Reply To: Need help with a menu bar

#245133
Beverleyh
Participant

Thank you. That’s appreciated.

ul elements (as with many other elements) have default padding – so the bullets don’t go outside the container. It’s for this reason that you get CSS resets/normalisation – to try to standardise everything across browsers, that otherwise have different ideas about what the defaults should be. So for your ul.topnavmobile, setting padding:0; will neutralise the default list padding and allow the link inside to span full width.
But, you have a few other declarations against that element that can come out; overflow:hidden; and I think right:0; and left:0; too (I’m on mobile now so can’t do any thorough testing). I think you might have put those in there by way of counteracting the left hand gap, but now they aren’t needed because the padding:0; reset sorts it out.

Hope that helps