padding-right

The padding-right property sets the right padding of an element.

Syntax

padding-right: <length> | <percentage> | inherit
Initial: 0
Applies To: all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group, and table-column
Inherited: no
Percentages: refer to width of containing block
Media: visual

Values

padding-right: value
Value Initial Description
length 0 Specifies a fixed length
percentage Specifies a percentage of the containing block

DOM

[window.]document.getElementById("element-id").style.paddingRight = "padding-right";

Example | length

Example | percentage

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification