Reputation: 91
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!
Upvotes: 0
Views: 55
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).
Upvotes: 2
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