CSS padding-bottom property

CSS Padding-bottom Property

Description

The padding-bottom property sets the padding width at the bottom of an element.

Possible Values

  • length – Any length value. Negative length values ​​are not allowed for this property.
  • percentage – The width of the bottom padding is calculated relative to the width of the element’s containing block.


Applies to

All HTML elements.

DOM syntax

object.style.paddingBottom = "10px;"; 

Example

This is an example –

<html> 
<head> 
</head> 

<body> 
<p style = "padding-bottom: 15px; border:1px solid black;"> 
This is a paragraph with a specified bottom padding
</p>

<p style = "padding-bottom: 5%; border:1px solid black;">
This is another paragraph with a specified bottom padding in percent
</p>
</body>
</html>

This will produce the following:

CSS padding-bottom property

Leave a Reply

Your email address will not be published. Required fields are marked *