padding-bottom

Sets the amount of space to insert between the indicated border of the object and the content.

Syntax

{ padding-bottom: sPadding }

Possible values

sPadding

Variant that specifies or receives one of the following 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 Length units reference.

percentage

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

The property has a default value of 0 for all objects and is not inherited.

Remarks

Negative values are not allowed.

Examples

The following example uses the padding-bottom property to change the padding of the object. This example uses the TD element as a selector in an embedded style sheet to set the top padding for all table cells to 1 centimeter:

<style>
    td { padding-bottom: 1cm; }
</style>

This example uses inline scripting to set the top padding of the cell to 1 centimeter when an onmouseover event occurs:

<td onmouseover="this.style.paddingTop='1cm'" onmouseout="this.style.paddingTop=''">
    <img src="sphere.jpg">
</td>

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee341487.xtlink_newWindow(en-us,Expression.40).png.

Applies to

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, hn, hr, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

See also

Concepts

padding
margin

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.