Search code examples
htmlcsswidthpadding

[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


Solution

  • 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