Export (0) Print
Expand All

paddingBottom property

Sets or retrieves the amount of space to insert between the bottom border of the object and the content.

CSS 2.1, Section 5.5.8Internet Explorer 9

Syntax

Integer value = object.put_paddingBottom(Variant v);Integer value = object.get_paddingBottom(Variant* sPadding);

Property values

Type: VARIANT

percentage (percentage)

Integer, followed by a percent sign (%). The value is a percentage of the width of the parent object.

String format

<length> | <percentage>

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value0

Standards information

Remarks

As of Microsoft Internet Explorer 5.5, this property applies to inline elements. With earlier versions of Windows Internet Explorer, inline elements must have an absolute IHTMLRuleStyle::position or layout to use this property. Element layout is set by providing a value for the IHTMLRuleStyle::height property or the IHTMLRuleStyle::width property.

Negative values are not allowed.

Examples

In the following example, two div elements each contain text and specify IHTMLRuleStyle::width and IHTMLRuleStyle::border values. The second div element also specifies a IHTMLRuleStyle::paddingBottom value.


<div id="noPadding">
   Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div>
<div id="paddingBottom">
   Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div>



#noPadding {
   width: 200px;
   border: .5em solid #BBBBBB;
}
#paddingBottom {
   width: 200px;
   border: .5em solid #BBBBBB;
   padding-bottom: 20px;
}

The following image shows the first div element without any padding.

An HTML element without any padding

The following images shows the second div element with a IHTMLRuleStyle::paddingBottom value of 20 pixels.

An HTML element with padding-bottom set to 20 pixels

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

CSS Enhancements in Internet Explorer 6

 

 

Community Additions

ADD
Show:
© 2014 Microsoft