Help Center

Local Navigation

CSS property: margin-top

Availability

BlackBerry® Device Software version 4.6 or later

Usage

All elements except those with table display types other than table-caption, table, and inline-table

Inherited

No

Default value

0

The margin-top specifies the width of the margin to the top of an element.

Considerations

If you specify a value for margin-top as a percentage, the value is calculated as the specified percentage of the containing block’s width, not its height.

Property values

Parameter

Description

length

This value specifies an absolute value for the margin width. The value can be an integer with the unit of measurement. For example, “10pt” or “6px”. Negative values are permitted.

Possible units include pt, px, in, cm, pc, em, or ex.

percentage

This value specifies the margin width as a percentage of the width of the containing block.

auto

This value specifies that the BlackBerry® Browser determines the top margin of the element.

inherit

This value specifies that the element inherits the margin-top property value from the containing element.

Index


Was this information helpful? Send us your comments.