CSS Home
CSS Reference
Pseudo Classes & Elements
© 2011 TutorialsPoint.COM
|
CSS - padding-right
Description:
The padding-right property sets the width of the padding on the right of an element.
Possible Values:
- length: Any length value. Negative length values are not permitted for this property.
- percentage: The right padding's width is calculated with respect to the width of the element's containing block.
Applies to:
All the HTML elements
DOM Syntax:
object.style.paddingRight="10px;";
|
Example:
Here is the example:
<p style="padding-right: 15px; border:1px solid black;">
This is a paragraph with a specified right padding
</p>
<p style="padding-right: 5%; border:1px solid black;">
This is another paragraph with a specified right padding in percent
</p>
|
This will produce following result:
This is a paragraph with a specified right padding
This is another paragraph with a specified right padding in percent
|
To Become more comfortable - Do Online Practice
|
|
|