Consider the following example: (Live demo here)
HTML:
<div id="wrapper">
<textarea></textarea>
</div>
CSS:
div {
background-color: #777;
}
textarea {
background-color: inherit;
}
I would like the textarea to inherit the background color from the wrapper.
It works well in Firefox.
But, in Internet Explorer 7, the background color is white. Why ?
How could I fix that ?
IE7 does not support
inheritfor any properties besidesdirectionandvisibility.Source.
You could set the
textarea‘sbackground-colortotransparentinstead.