P粉5117578482023-08-03 11:14:58
The default setting of the browser is to add some padding to the UI instead of margin. So using padding: 0px will override the browser's default value.
Look at the Computed tab on the right, it shows a list of browser styles padding-left: 40px;
ul.no-padding { list-style-type: none; padding: 0px; } ul.no-margin { list-style-type: none; margin: 0px; }
<ul> <li> Linkedin </li> </ul> <ul class="no-margin"> <li> Linkedin </li> </ul> <ul class="no-padding"> <li> Linkedin </li> </ul>