asp.net.ph

Skip Navigation Links

padding-right Attribute | paddingRight Property

CSS Attributes Index   Box Attributes


Sets or retrieves how much space to insert between the object’s right border and the content.

Syntax


CSS { padding-right: length | percentage }
Script object.style.paddingRight = length | percentage

Possible Values


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.

Remarks

Negative values are not allowed.

Example

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 

Applies To

BODY, BUTTON, CAPTION, currentStyle, DIV, HTMLAREA, IFRAME, IMG, ISINDEX, MARQUEE, runtimeStyle, style, TABLE, TD, TEXTAREA, TR

See Also

padding, padding-bottom, padding-left, padding-top



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note