Question is in the subject.
To add background color to the form input, use the background-color property.
To add background color in HTML, use the CSS background-color property. Set it to the color name or code you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a table, heading, div, or span tag.
Demonstration :)
textarea:focus
{
background-color: #00ff00;
}
You can use CSS pseudo-class selectors like this:
textarea:focus { background-color: red }
Note that this doesn't work IE7 and lower.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With