|
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.
Navigation:
[Reply to this message]
|