Home > OS >  Nav Bar has added padding which is not in my CSS code
Nav Bar has added padding which is not in my CSS code

Time:01-11

in the "ul" Elememt it shows that it has padding on the left side (padding is green and the orange is margin

but when I looked through what I've got in my CSS structure i do not not have any padding at all

My Nav Bar elements

I tried to fix it by checking through the dev tools but nothing happened and then I tried removing some properties in my CSS but it didn't make any changes

CodePudding user response:

The user agent stylesheet of the browser itself is applying that padding. If you want to get rid of it, you'll need to override it by setting:

ul {
 /* All your other ul styling here... */
 padding-left: 0;
}
  • Related