What is the difference between the padding-bottom and padding-right properties in CSS
Today, the editor will share with you the relevant knowledge points about the difference between padding-bottom and padding-right attributes in CSS. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
CSS padding-bottom attribute
Definition and usage
The padding-bottom attribute sets the bottom inner margin (bottom space) of the element.
Description
This property sets the width of the inner margin under the element. The lower inner margin set on an inline non-replacement element does not affect the row height calculation, so if an element has both an inner margin and a background, it may visually extend to other lines and overlap with other content. Negative inner margin values are not allowed.
Note: negative values are not allowed.
Example
Set the lower inner margin of the p element:
P {padding-bottom:2cm;}
Browser support
All major browsers support the padding-bottom attribute.
Note: no version of Internet Explorer (including IE8) supports the attribute value "inherit".
Possible value
CSS padding-right attribute
Define
The padding-left attribute sets the right inner margin (white space) of the element.
Note: negative values are not allowed.
Inheritance: No
Description
This property sets the width of the right inner margin of the element. The right inner margin set on an inline non-replacement element appears only to the right of the inline boxes generated by the element.
JavaScript syntax
The CSS attribute can also be changed dynamically through a JavaScript.
Script syntax:
Object.style.paddingRight= "2cm" in our HTML DOM tutorial, you can find more details about the paddingRight attribute.
You can also find the complete Style object reference manual in our HTML DOM tutorial.
Examples
H2 {padding-right: 10px}
Possible value
These are all the contents of this article entitled "what is the difference between padding-bottom and padding-right attributes in CSS". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.