Javascript Reference
Categories: STYLE

javascript STYLE paddingBottom, paddingLeft, paddingRight, paddingTop

@March 15, 2008, 1:22 a.m.
paddingBottom, paddingLeft, paddingRight, paddingTopFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

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.getElementById("logoWrapper").style.paddingTop = "3px";
document.getElementById("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


Powered by Linode.