width of anchor tag of a vertical navigation bar not being set properly

Hello guys, sorry to disturb you all; each time, I build a horizontal navigation bar; to change I wanted to build a vertical one this time. But it seems I'm having some issues with the width of the anchor tag, like I wanted extra spaces to the right of the anchor tags but this isn't being achieved; I try to modify the paddings to the right and left, nothings seems to happen.... can someone explain what I'm I doing wrong please. https://codepen.io/Fakeur/pen/KKOjgaN
10 Replies
Faker
FakerOP•4w ago
also, I tried to add a hover effect, it seems like the anchor tag isn't taking the full width, why please
Mannix
Mannix•4w ago
remove the default padding from the ul 😉
Faker
FakerOP•4w ago
ah lmao, true it works now, thanks !!!
Mannix
Mannix•4w ago
then on a you can do padding: 1rem 2rem;
Faker
FakerOP•4w ago
yep this is what I did, but didn't understand, why the padding of ul was causing some issues here?
Mannix
Mannix•4w ago
devtools is your friend use it 😄
Faker
FakerOP•4w ago
yep, by the way, max-width was the correct property to use here? to restrict the background color from taking whole width of viewport ?
Mannix
Mannix•4w ago
yup 🙂
Faker
FakerOP•4w ago
ty !!
Mannix
Mannix•4w ago
:thumbup:
Want results from more Discord servers?
Add your server