Difference between revisions of "CSS GUIDE -MOZ-USER-SELECT"
(→Notes) |
(→Notes) |
||
Line 38: | Line 38: | ||
When the 'none' value was applied to a heading element the content could still be selected. | When the 'none' value was applied to a heading element the content could still be selected. | ||
− | According to the W3C, the <i>" | + | According to the W3C, the <i>"User agent's default style sheet may override this value. For example, user agents typically do not allow selection of the contents of a BUTTON element.</i> [http://www.w3.org/TR/1999/WD-css3-userint-19990916#user-select] |
== Specification Conformance == | == Specification Conformance == |
Revision as of 23:43, 13 December 2006
Contents
Summary
-moz-user-select is a Mozilla property extension to CSS that is used to determine whether or not an element may have its content selected.
Media: interactive
Possible uses include: prohibiting the selection of content in attempts to reduce blatant copying.
Syntax
TARGET_ELEMENT{-moz-user-select: none;}
Legal Values
Value | Description |
---|---|
inherit | Inherit the value from the parent element. |
none | None of the content may be selected. |
text | Only the text within the element may be selected. |
element | A single element may be selected (from many). |
elements | Multiple elements may be selected. |
all | The contents must either be selected in entirety or none at all. |
toggle | |
tri-state | |
-moz-all |
Usage Examples
This sample code provides a simple "Hello, World!" text which prevents the user from selecting the content:
<span style="-moz-user-select: none;"> Hello, World! </span>
Notes
This property is similar to the user-select property of CSS3.
When the 'none' value was applied to a heading element the content could still be selected.
According to the W3C, the "User agent's default style sheet may override this value. For example, user agents typically do not allow selection of the contents of a BUTTON element. [1]
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-modify
References
Mozilla Developer Centre - CSS Reference - Mozilla Extensions (developer.mozilla.org)
Netscape CSS Extensions (blooberry.com)
User Interface for CSS3 (w3.org)