I want to decrease the padding of my ul, right now it’s 40 (I think). This code works to make the padding zero:
ul {
padding: 0;
list-style-type: none;
}
Using this code above works but it can only be 0 when I try something like 10 or 20 it doesnt work anymore. When I inspect the element I want to change it says the padding is 40 right now.
2
Answers
Since you have not shown any
HTML markup
, norCSS classes
/Style sheets
. Try to resolve the conflict in the CSS itself, or append!important
to any size value present.And, it is reccommended to add a classname to the element itself, instead of assigning it to the whole
ul
element.Anything other than "0" add px (for example).
If you just add 10, it does not know if that is 10px, 10em, etc.