|
Posted by Jukka K. Korpela on 02/24/07 10:16
Scripsit dorayme:
>>> It is inheriting the background from somewhere else in your
>>> code...
>>
>> Hardly. The background property is not inherited by default, and IE
>> does not recognize the keyword inherit.
>
> I guess I was thinking that the form may have been part of
> something has been styled for color and background.
Even then, the background isn't inherited.
> div.high {color: #0f0; background: #f00;}
>
> html snippet:
>
> <div class="high">
> <div><form...>...</form></div>
> </div>
That's possible of course - people suffering from divitis put all kinds of
div markup in their documents (instead of something simple like <form ...
class="high">). :-)
> The red bg appears in this form
The form element has transparent background by default, so the red
background would shine through, but that's not inheritance.
Form fields, on the other hand, typically have the background color set by
browser defaults ("browser style sheet", conceptually at least). It has been
white on all browsers I've used. Since the color property is (conceptually
at least) set for a form field element in a style sheet, inheritance never
takes place, except if you explicitly declare background: inherit (which
isn't supported by IE).
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|