Reply to Re: colored text box

Your name:

Reply:


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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация