Get the App
SLTechnology News&Howtos  ›  Development  › 

What does margin-bottom mean in css

Shulou Source: shulou.com Published: 2022-06-01 05:32:33 10月02日 Update

This article will explain in detail what margin-bottom means in css. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The syntax for the margin-bottom attribute is as follows:

Margin-bottom:value

Possible values for value:

Auto: the browser calculates the outer margin.

Length: specifies the value of the lower margin in specific units, such as pixels, centimeters, etc. The default value is 0px.

%: specifies the bottom margin based on the percentage of the width of the parent element.

Inherit: specifies that the lower margin should be inherited from the parent element.

Let's take a look at the code example of margin-bottom

P.bottommargin {margin-bottom:2cm}

This paragraph does not specify an outer margin.

This paragraph has a specified bottom margin.

This paragraph does not specify an outer margin.

This is the end of the article on "what is the meaning of margin-bottom in css". 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: Paragraph article meaning element more good practical code pixel content unit width attribute article browser percentage percentage knowledge example grammar Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info Shulou Technology vpn macOS