Difference between revisions of "CSS GUIDE -MOZ-USER-MODIFY"
(→Summary) |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
+ | '''-moz-user-modify''' is a Mozilla property extension to CSS that is used to determine whether or not an element may be modified. | ||
+ | |||
+ | '''Media:''' interactive | ||
+ | |||
+ | Possible uses include: | ||
+ | *update forms which should prohibit modification of certain content, but wish to utilize the same look-and-feel as the input form (for example, textbox usage). | ||
+ | *template pages | ||
== Syntax == | == Syntax == | ||
− | + | <pre> | |
+ | TARGET_ELEMENT{-moz-user-modify: inherit;} | ||
+ | TARGET_ELEMENT{-moz-user-modify: read-only;} | ||
+ | TARGET_ELEMENT{-moz-user-modify: read-write;} | ||
+ | TARGET_ELEMENT{-moz-user-modify: write-only;} | ||
+ | </pre> | ||
+ | |||
== Legal Values == | == Legal Values == | ||
+ | <table border="1" cellpadding="3"> | ||
+ | <tr><th>Value</th><th>Description</th></tr> | ||
+ | <tr><td>inherit</td><td>Inherit the value from parent element.</td></tr> | ||
+ | <tr><td>read-only</td><td>Allow for viewing, selecting and copying the element contents. '''This has been tested in FF2.0 and doesn't work.'''</td></tr> | ||
+ | <tr><td>read-write</td><td>Allow for viewing, selecting, copying and editing the element contents.</td></tr> | ||
+ | <tr><td>write-only</td><td>Allow for selecting and editing the element contents.</td></tr> | ||
+ | </table> | ||
− | == | + | == Usage Examples == |
+ | This sample code provides a textbox which allows the user to type and modify content, but does not allow for the cut, copy and paste facilities: | ||
− | == | + | <pre> |
+ | <form method="post" action="foo"> | ||
+ | <span style="-moz-user-modify:write-only;"> | ||
+ | <input type="text" name="tb1" value="qwerty" /> | ||
+ | </span> | ||
+ | </form> | ||
+ | </pre> | ||
== Notes == | == Notes == | ||
+ | This property is similar to the [http://www.w3.org/TR/1999/WD-css3-userint-19990916#user-modify user-modify] property of CSS3. | ||
== Specification Conformance == | == Specification Conformance == | ||
+ | Doesn't conform to CSS standards; [http://developer.mozilla.org/en/docs/CSS_Reference:Mozilla_Extensions A Mozilla CSS Extension]. | ||
== Browser Compatibility == | == Browser Compatibility == | ||
+ | Netscape 6+ | ||
+ | <br>Mozilla 0.6+ | ||
+ | <br>Firefox 1.0+ | ||
== See Also == | == See Also == | ||
+ | [[CSS_GUIDE_-MOZ-USER-FOCUS|-moz-user-focus]] | ||
+ | <br>[[CSS_GUIDE_-MOZ-USER-INPUT|-moz-user-input]] | ||
+ | <br>[[CSS_GUIDE_-MOZ-USER-SELECT|-moz-user-select]] | ||
+ | |||
+ | == References == | ||
+ | [http://developer.mozilla.org/en/docs/CSS_Reference:Mozilla_Extensions Mozilla Developer Centre - CSS Reference - Mozilla Extensions] (developer.mozilla.org) | ||
+ | <br>[http://www.blooberry.com/indexdot/css/properties/extensions/nsextensions.htm Netscape CSS Extensions] (blooberry.com) | ||
+ | <br>[http://www.w3.org/TR/1999/WD-css3-userint-19990916#user-modify User Interface for CSS3] (w3.org) |
Latest revision as of 23:41, 13 December 2006
Contents
Summary
-moz-user-modify is a Mozilla property extension to CSS that is used to determine whether or not an element may be modified.
Media: interactive
Possible uses include:
- update forms which should prohibit modification of certain content, but wish to utilize the same look-and-feel as the input form (for example, textbox usage).
- template pages
Syntax
TARGET_ELEMENT{-moz-user-modify: inherit;} TARGET_ELEMENT{-moz-user-modify: read-only;} TARGET_ELEMENT{-moz-user-modify: read-write;} TARGET_ELEMENT{-moz-user-modify: write-only;}
Legal Values
Value | Description |
---|---|
inherit | Inherit the value from parent element. |
read-only | Allow for viewing, selecting and copying the element contents. This has been tested in FF2.0 and doesn't work. |
read-write | Allow for viewing, selecting, copying and editing the element contents. |
write-only | Allow for selecting and editing the element contents. |
Usage Examples
This sample code provides a textbox which allows the user to type and modify content, but does not allow for the cut, copy and paste facilities:
<form method="post" action="foo"> <span style="-moz-user-modify:write-only;"> <input type="text" name="tb1" value="qwerty" /> </span> </form>
Notes
This property is similar to the user-modify property of CSS3.
Specification Conformance
Doesn't conform to CSS standards; A Mozilla CSS Extension.
Browser Compatibility
Netscape 6+
Mozilla 0.6+
Firefox 1.0+
See Also
-moz-user-focus
-moz-user-input
-moz-user-select
References
Mozilla Developer Centre - CSS Reference - Mozilla Extensions (developer.mozilla.org)
Netscape CSS Extensions (blooberry.com)
User Interface for CSS3 (w3.org)