AdBlock Detected!
Our website is made possible by displaying ads to our visitors. Please supporting us by whitelisting our website.
CSS padding-top Property |
The padding-top property in CSS is used to set the amount of padding added to the top of an element. It has the following syntax:
where [value] can be specified either in length or in percentages. When specified in percentages, it is the percentage of the width of the element. The default value for padding-top is 0, and [value] can never be a negative number. Example 1
The following HTML
renders the following:
Notice the top padding the text and the top of the light green area is 20px. The right, left, and bottom paddings are all 0. Example 2
The following HTML
renders the following:
Notice the top padding the text and the top of the light green area is 18% of the width. The right, left, and bottom paddings are all 0. List of padding properties
|
Our website is made possible by displaying ads to our visitors. Please supporting us by whitelisting our website.