MDN The margin-bottomCSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
MDN The margin-leftCSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
MDN The margin-rightCSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
MDN The margin-topCSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
<section id="default-example"> <div class="transition-all" id="example-element"> <div class="box"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div> </div></section>
Syntax
<'padding-top'>{1,4}
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
0
Applies to
all elements except: internal table elements other than table cells, ruby base containers, and ruby annotation containers
<section id="default-example"> <div class="transition-all" id="example-element"> <div class="box"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div> </div></section>
Syntax
<length-percentage [0,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
0
Applies to
all elements except: internal table elements other than table cells, ruby base containers, and ruby annotation containers
Inherited
no
Percentages
refer to logical width of containing block
Computed value
a computed <length-percentage> value
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting padding-bottom
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
<section id="default-example"> <div class="transition-all" id="example-element"> <div class="box"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div> </div></section>
Syntax
<length-percentage [0,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
0
Applies to
all elements except: internal table elements other than table cells, ruby base containers, and ruby annotation containers
Inherited
no
Percentages
refer to logical width of containing block
Computed value
a computed <length-percentage> value
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting padding-left
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
<section id="default-example"> <div class="transition-all" id="example-element"> <div class="box"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div> </div></section>
Syntax
<length-percentage [0,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
0
Applies to
all elements except: internal table elements other than table cells, ruby base containers, and ruby annotation containers
Inherited
no
Percentages
refer to logical width of containing block
Computed value
a computed <length-percentage> value
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting padding-right
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
<section id="default-example"> <div class="transition-all" id="example-element"> <div class="box"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div> </div></section>
Syntax
<length-percentage [0,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
0
Applies to
all elements except: internal table elements other than table cells, ruby base containers, and ruby annotation containers
Inherited
no
Percentages
refer to logical width of containing block
Computed value
a computed <length-percentage> value
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting padding-top
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.