Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

padding-bottom 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.8

Syntax

padding-bottom: <length> | <percentage>

Property values

length

Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

percentage

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

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value0

Standards information

Remarks

Negative values are not allowed.

Examples

In the following example, two div elements each contain text and specify width and border values. The second div element also specifies a padding-bottom 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 padding-bottom value of 20 pixels.

An HTML element with padding-bottom set to 20 pixels

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
CSS Enhancements in Internet Explorer 6

 

 

Show:
© 2014 Microsoft