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•2d 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•2d ago
remove the default padding from the ul 😉
Faker
FakerOP•2d ago
ah lmao, true it works now, thanks !!!
Mannix
Mannix•2d ago
then on a you can do padding: 1rem 2rem;
Faker
FakerOP•2d ago
yep this is what I did, but didn't understand, why the padding of ul was causing some issues here?
Mannix
Mannix•2d ago
devtools is your friend use it 😄
Faker
FakerOP•2d 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•2d ago
yup 🙂
Faker
FakerOP•2d ago
ty !!
Mannix
Mannix•2d ago
:thumbup:
Want results from more Discord servers?
Add your server