Trying to get rid of margin on navigation bar

Hi,

I have created my navigation bar so that when I hover over the links, the background is pink. However when I do this I see that there is a margin to the left that I am trying to get rid of. I want the pink background to cover the full width of the navigation bar.

This is the link to my code: https://codepen.io/IkeaFlowers/pen/QWqbOGx

Help is greatly appreciated :slight_smile:

Since you’ve added that margin / styled it that way, why don’t you just take it away?

Thanks for the reply.

I may have explained my query badly. I didn’t add a margin, but there is a gap to the left when I hover over the links and I’m not sure why.

Then open the dev-tools, inspector tab and look at it :wink:
The gap comes from the <ul>

Use dev-tool and inspect. There is a margin and it’s what you’ve coded.

@aobarbieri, we try to guide people to solutions rather than giving out answers.

Ops sorry! Thanks for the heads up!

Forgive me for sounding stupid, but what is dev-tool? This is new to me.

It’s not a dumb question. It’s something that browsers have built in that allows developers to test and debug code.
There’s a lot more than I can type. It’s best if you search for something like what is devtools and read up on it. Ask questions on what you don’t understand.

I see you’ve found the cause of the gap and corrected it.

1 Like

Thank you for your help! :smiley:

1 Like

Glad to have helped and good job on finding and correcting your issue.