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
also, I tried to add a hover effect, it seems like the anchor tag isn't taking the full width, why please
remove the default padding from the ul 😉
ah lmao, true
it works now, thanks !!!
then on
a
you can do padding: 1rem 2rem;
yep this is what I did, but didn't understand, why the padding of ul was causing some issues here?
devtools is your friend use it 😄
yep, by the way, max-width was the correct property to use here? to restrict the background color from taking whole width of viewport ?
yup 🙂
ty !!
:thumbup: