clauu
clauu

Reputation: 91

[Html][CSS]Padding is not the same for my navigation menu elements

As you can see in the picture, the padding for each element from my list (navigation menu) differs but I have used the same padding for all of them...

I know that the problem is that the padding/width is modifying the content and I don't know how to fix it!

Click here to see the image

Upvotes: 0

Views: 55

Answers (2)

raul.vila
raul.vila

Reputation: 1984

They have the same padding. See padding documentation. If you want full width you should try width: 100% or display: block (a elements have display: inline as default, as pointed in other answer).

enter image description here

Upvotes: 2

Aryan Twanju
Aryan Twanju

Reputation: 2516

You should try adding display: block to your nav a selector because a selector is not a block level element by default. Try adding this to your code.

nav a {
display: block;
}

Upvotes: 1

Related Questions