Reply to Re: Background in css gives warning

Your name:

Reply:


Posted by Harlan Messinger on 02/26/06 22:13

Toby Inkster wrote:
> Jukka K. Korpela wrote:
>
>> Transparent means that you accept that whatever the cascade happens to
>> assign as value to the parent element's background property this time
>> will appear as the background.
>
> If you control all of the HTML, then specifying something like:
>
> STRONG {
> color: red;
> background: transparent;
> }
>
> in CSS might make sense, because you may know that you'll only ever use
> <strong> within <div id="content"> which has an off-white background.

But the user may have a stylesheet with

STRONG { background-color: red ! important; }

though I doubt it. However, in your scenario, you could use the selector

div#content STRONG

instead. The user's stylesheet is highly unlikely to have anything
applicable that's of higher specificity than that.

[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

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