|
Posted by JWL on 09/26/06 12:59
Michael Winter wrote:
> JWL wrote:
>
> [snip]
>
>> #wrap2 {
>> width: 800px;
>> background-color: #FFF;
>> background: url(images/line.gif) repeat-y;
>> }
>>
>> Suddenly, wrap2 becomes transparent ...
>
> The shorthand property can also be used to specify the colour, but as
> you haven't included it, the initial value of transparent is used
> instead. That is:
>
> background: url(images/line.gif) repeat-y;
>
> is equivalent to:
>
> background: transparent url(images/line.gif) repeat-y scroll 0% 0%;
>
> As this declaration follows the explicit background-color property
> declaration, it overrides the value set there.
>
> This sort of thing applies to all shorthand properties. Either swap the
> declaration order, or include the colour in the shorthand declaration.
>
> [snip]
>
> Mike
Doh!
It's so obvious now that you've pointed it out.
Thanks very much for your help.
Navigation:
[Reply to this message]
|