CSS Attributes Index Box Attributes
Sets or retrieves how much space to insert between the object’s right border and the content.
CSS |
{ padding-right: length | percentage } |
Script |
object.style.paddingRight = length | percentage |
length |
Floating-point number and a valid CSS length unit: either an absolute units designator ( cm, mm, in, pt, pc, or px ) or a relative units designator ( em or ex ). |
percentage |
Value expressed as a percentage of the parent object’s width. |
The property is read/write with a default value of 0; this attribute is not inherited.
Negative values are not allowed.
The sample below uses inline event handlers to dynamically set an object’s paddingRight property in response to mouse events.
<td onmouseover="this.style.paddingRight='1cm'"
onmouseout="this.style.paddingRight=''">
<img src="../shared/images/earth.gif">
</td>
Show me
BODY, BUTTON, CAPTION, currentStyle, DIV, HTMLAREA, IFRAME, IMG, ISINDEX, MARQUEE, runtimeStyle, style, TABLE, TD, TEXTAREA, TR
padding, padding-bottom, padding-left, padding-top