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.
CodePudding user response:
Since you have not shown your html markup and no css classes/sheetsheets are shown. try to resolve the conflict in css cascades or you can put whatever px with !important.
and better to add class to the element instead of doing on the complete ul
e.g.
ul.someClass{
padding:10px !important;
list-style-type:none;
}
CodePudding user response:
Anything other than "0" add px (for example). If you just add 10, it does not know if that is 10px, 10em, etc.
ul {
padding: 10px;
list-style-type: none;
}