Margin értékek: margin CSS jellemző tulajdonságai

Margin

Elem margója. Sorrend: felső, jobb, alsó, bal.

Shorthand property used to declare all the margin properties at once.
Lehetséges értékek:
minden oldalra jellemzően:
hosszúság
...%
auto (alapértelmezett)
Separate values by a space in the following order (those that are not defined will use inherited or default initial values):

margin-top
margin-right
margin-bottom
margin-left

Undeclared values work as further shorthand notation. If only one length value is declared, all four margins will use that length. If two lengths are declared, the top and bottom margins will use the first length while the right and left margins will use the second length. If three lengths are declared, the top margin will use the first length, the right and left margins will use the second length, and the bottom margin will use the third length.

<margin-width>{1,4} | inherit

Margin minták, példák:

div { margin:5px 12px 4px 7px; }

div { margin:5px; }

div { margin:5px 10px; }

div { margin:5px 7px 4px; }


margin:100px 5% 1cm 3mm;
Alapértelmezett érték: nincs
Öröklődő tulajdonság: nem
Media besorolás: visual
Csoport besorolás: margin értékek

Kompatibilitás: CSS 1, CSS 2, CSS 2.1, CSS 3,

További margin értékek:

margin-top margin-right margin-bottom margin-left

Margin CSS tulajdonságok, referencia

Webdesign