-webkit-margin-collapse property
Specifies whether the top and bottom margins can be shared between adjacent elements.
JavaScript page for this property: webkitMarginCollapse. You can find other example(s) there. |
Possible values:
One of the following values: | ||||||||||||||||
|
Description of values:
Specifies whether the top and bottom margins can be shared between adjacent elements. | |||||||
Specifies whether the top and bottom margins can be shared between adjacent elements. | |||||||
Default. Margins are collapsed with the adjacent elements. | |||||||
Discards the margin. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Default. Separate margins are drawn for the adjacent elements. |
Default: collapse collapse.
If only one value is specified, it affects both the -webkit-margin-top-collapse and -webkit-margin-bottom-collapse properties.
Example HTML code 1:
This example illustrates the use of the -webkit-margin-collapse property:
|
||||
<head> <style> .collMargin { -webkit-margin-collapse: separate; margin:20px; } </style> </head> <body> <div class="collMargin" style="border:3px solid #000000;"> The margins are separate </div> <div class="collMargin" style="border:3px solid #000000;"> between these two divisions </div> <div style="border:3px solid #000000;margin:20px;"> The margins are collapsed </div> <div style="border:3px solid #000000;margin:20px;"> between these two divisions </div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, applet, b, bdo, big, blockQuote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldSet, font, form, H1, H2, H3, H4, H5, H6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isIndex, kbd, label, legend, li, marquee, menu, object, ol, p, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tBody, td, textArea, tFoot, th, tHead, tr, tt, u, ul, var, xmp
Related pages:
External links:
User Contributed Comments