You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > MozOutline

MozOutline style property

Browser support:
3.6
Sets or retrieves the outline of the element.
Deprecated and the support for it has been removed in Firefox 3.6. Use the cross-browser outline property instead.

Syntax:

object.MozOutline;
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -moz-outline

Possible values:

The type of this property is string.
 One of the following values: 
 Any of the following values (use the space character to separate them, each value can be used only once): 
<-moz-outline-color>
<-moz-outline-style>
<-moz-outline-width>
inherit

Description of values:

-moz-outline-color
Sets or retrieves the color of the outline.
-moz-outline-style
Sets or retrieves the style of the left, right, top, and bottom borders of the object.
-moz-outline-width
Sets or retrieves the width of the outline.
inherit
Takes the value of this property from the computed style of the parent element.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the -moz-outline property:
<head>
    <style>
        .example {
            -moz-outline: 5px solid blue;
            border: 5px solid black;
        }
    </style>
</head>
<body>
    <div class="example">Outline and border</div>
</body>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the MozOutline property in JavaScript:
<head>
    <script type="text/javascript">
        function SetMozOutline () {
            var div = document.getElementById ("myDiv");
            var input = document.getElementById ("myInput");

            if ('MozOutline' in div.style) {
                div.style.MozOutline = input.value;
            } else {
                alert ("Your browser doesn't support this example!");
            }
        }
    </script>
</head>
<body>
    <div id="myDiv">Outline: 1px solid blue</div>

    <br /><br /><br />

    <input id="myInput" type="text" value="4px dotted blue" />
    <button onclick="SetMozOutline ();">Set MozOutline!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content