Name

paddingRight, paddingTop — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

All four properties set the width of a single padding edge of an element. Padding is space that extends between the element’s border and content box. Padding is not calculated as part of the element’s width or height.

Example

document.all.logoWrapper.style.paddingTop = "3px"
document.all.navPanel.style.paddingLeft = "10%"

Value

Values for padding widths can be length values, percentages of the next outermost element size, or the auto constant.

Default

0

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.