You are here: Reference > CSS > properties > browser specific extensions > -moz-margin-end

-moz-margin-end property

Browser support:
Specifies the width of the left or the right margin, depends on the writing direction.
If the writing direction is set to left-to-right, use the margin-right property, else use the margin-left property for cross-browser compatibility.
Note: Safari and Google Chrome do not support a property named '-webkit-margin-end', but support the -webkit-margin-start property.
JavaScript page for this property: MozMarginEnd. You can find other example(s) there.

Possible values:

 One of the following values: 
auto
Default. The sizes of the 'auto' margins are equal.
inherit
Takes the value of this property from the computed style of the parent element.
width in length
The width of the margin in length units. For the supported length units, see the length page.
width in percentage
The width is the specified percentage of the width of the parent element.
Default: 0.

Example HTML code 1:

This example illustrates the use of the -moz-margin-end property:
<head>
    <style>
        .ltr {
            direction: ltr;
            border: 2px solid red;
            -moz-margin-end : 20px;
        }
        .rtl {
            direction: rtl;
            border: 2px solid red;
            -moz-margin-end : 20px;
        }
    </style>
</head>
<body>
    <a style="border: 2px solid green;">previous object</a>
    <a class="ltr">margin-end: 20px (ltr)</a>
    <a style="border: 2px solid green;">next object</a>
    <br /><br />
    <a style="border: 2px solid green;">previous object</a>
    <a class="rtl">margin-end: 20px (rtl)</a>
    <a style="border: 2px solid green;">next object</a>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content