::Stuff for the multi-spec coder;

Coding, formats, standards, and other practical things.

 Home  //  CSS  //  margin-side 

<!-- CSS 2.1 Reference

Property Name:

margin-top

margin-right

margin-bottom

margin-left


Default Value: 0
Inherited: no
Possible values directly from the standard:
default_value:0

Property Description:

Specifies the size of a specific margin side of an element. It's the side-explicit version of the margin property. Part of the margin-border-padding properties that make up the Box Model. A note about margin-collapsing: Margin-Collapsing is a feature of CSS that causes quite a bit of confusion. Basically, when two vertical margins appear one after the other ('touch'), the larger margin takes precedence and the smaller one is simply ignored (it 'collapses' into nothing). Most problems occur when one element is contained within another, since the rule applies here as well (the elements do not have to follow each other, they merely have to be vertically adjacent). Broadly speaking, when applying margin values to elements, if you encounter odd behaviour with the Box Model, see if you can achieve the same effect using margins on only one side of the element (the top, for example), instead of both top and bottom. Remember that this does not apply to the left and right margins.


Example:

.example p { margin-left: 2em; }


Complete CSS Property Listing:
background-attachment, background-color, background-image, background-position, background-repeat, background, border-collapse, border-color, border-spacing, border-style, border-top, border-right, border-bottom, border-left, border-top-color, border-right-color, border-bottom-color, border-left-color, border-top-style, border-right-style, border-bottom-style, border-left-style, border-top-width, border-right-width, border-bottom-width, border-left-width, border-width, border, bottom, caption-side, clear, clip, color, content, counter-increment, counter-reset, cursor, direction, display, empty-cells, float, font-family, font-size, font-style, font-variant, font-weight, font, height, left, letter-spacing, line-height, list-style-image, list-style-position, list-style-type, list-style, margin-top, margin-right, margin-bottom, margin-left, margin, max-height, max-width, min-height, min-width, outline-color, outline-style, outline-width, outline, overflow, padding-top, padding-right, padding-bottom, padding-left, padding, position, quotes, right, table-layout, text-align, text-decoration, text-indent, text-transform, top, unicode-bidi, vertical-align, visibility, white-space, width, word-spacing, z-index














Looking for the old guiStuff?

It's still here, the old content didn't go anywhere.