Get the App
SLTechnology News&Howtos  ›  Development  › 

How css sets padding and margins to zero

Shulou Source: shulou.com Published: 2022-06-01 07:02:17 10月03日 Update

This article will explain in detail how css sets the padding and margins to zero. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Set fill and margin to zero

Body,div,dl,dt,dd,ul,ol,li,h2,h3,h4,h5,h6,h7,pre,form,fieldset,input,textarea,p,blockquote,th,td {margin:0;padding:0;}

There are also different views on the pros and cons of using the wildcard * {padding:0;margin:0;}. For the * sign, the inner and outer margins of all elements are set to 0, and there may be some small details, so choose the scheme that you apply.

This is the end of the article on "how css sets padding and margins to zero". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Articles more good some small practical elements content pros and cons articles solutions knowledge details websites statements wildcards questions references help related choices Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Xiaomi MySQL vpn Docker