CSS padding-bottom

The CSS padding-bottom property is used to create bottom padding for specified element. For example:

HTML with CSS Code
<!DOCTYPE html>
<html>
<head>
   <style>
      .myd{border: 2px solid coral; padding-bottom: 32px;}
   </style>
</head>
<body>
   
   <div class="myd">
      This is an example of padding-bottom property in CSS.
   </div>
   
</body>
</html>
Output
This is an example of padding-bottom property in CSS.

Note - Bottom padding is the width (height) of area below the content and before the border, of specified element.

CSS padding-bottom Syntax

The syntax of padding-bottom property in CSS, is:

padding-bottom: x;

The value of x should be any of the following:

Note - To learn about padding in detail, refer to its separate tutorial.

CSS Online Test


« Previous Tutorial Next Tutorial »