THE WORLD'S LARGEST WEB DEVELOPER SITE

CSS3 :read-write Selector


Example

Select and style only if the input element is not "readonly":

input:-moz-read-write { /* For Firefox */
    background-color: yellow;
}

input:read-write {
    background-color: yellow;
}

Try it yourself »

Definition and Usage

The :read-write selector selects form elements which are "readable" and "writeable".

Form elements with no "readonly" attribute, and no "disabled" attribute are defined as "read-" and "write-able".

Note: Currently, in most browsers, the :read-write selector only applies to input and textarea elements, where the "readonly" attribute is not present, regardless if the element is disabled or not.

Version: CSS3

Browser Support

The :read-only selector is supported in Chrome, Safari and Opera.

Internet Explorer does not support the :read-write selector.

Firefox supports an alternative, the :-moz-read-write selector.

Selector
:read-only Yes Not supported -moz-  Yes Yes

CSS Syntax

:read-write {
    css declarations;
}

Related Pages

CSS Selector :read-only



COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: