:read-write - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:read-write

Description

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

Form elements with no "readonly" attribute, and no "disabled" attribute are as "readable" and "writable".

Example

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
input:-moz-read-write { /* For Firefox */
    background-color: yellow;
}

input:read-write {
    background-color: yellow;
}
</style><!--from   w ww.j  a v a 2  s. c om-->
</head>
<body>

<input value="hello">

<br><input readonly value="hello">

</body>
</html>

Related Tutorials