You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > MozPaddingEnd
MozPaddingEnd style property
Specifies or returns the space between an element's left or right border and its contents, depending on the writing direction.
If the writing direction is set to left-to-right, use the paddingRight property, else use the paddingLeft property for cross-browser compatibility.
Note: Safari and Google Chrome do not support a property named 'webkitPaddingEnd', but support the webkitPaddingStart property.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -moz-padding-end |
Possible values:
The type of this property is string.
One of the following values:
Takes the value of this property from the computed style of the parent element. | |||||||
The space in length units. For the supported length units, see the length page. | |||||||
The space 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-padding-end property:
|
||||
<head> <style> .ltr { direction: ltr; border: 2px solid red; -moz-padding-end : 20px; } .rtl { direction: rtl; border: 2px solid red; -moz-padding-end : 20px; } </style> </head> <body> <a class="ltr">padding-end: 20px (ltr)</a> <br /><br /> <a class="rtl">padding-end: 20px (rtl)</a> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the MozPaddingEnd property in JavaScript:
|
||||
<head> <script type="text/javascript"> function ChangePaddingEnd () { var anchor = document.getElementById ("myAnchor"); var input = document.getElementById ("myInput"); if ('MozPaddingEnd' in anchor.style) { anchor.style.MozPaddingEnd = input.value + "px"; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <a id="myAnchor" style="border: 2px solid red;">anchor with margin</a> <a style="border: 2px solid green;">next object</a> <input id="myInput" type="text" value="40" /> <button onclick="ChangePaddingEnd ();">Change MozPaddingEnd!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.style
HTML elements:
a, abbr, acronym, address, applet, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, embed, 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:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, marquee, menu, object, ol, p, pre, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var
Related pages:
External links:
User Contributed Comments