W3C home > Mailing lists > Public > www-style@w3.org > December 2004

Re: Multiple Background Images

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 30 Nov 2004 20:41:04 -0500
Message-ID: <41AD2130.8010209@inkedblade.net>
To: www-style@w3.org

Replying on-list, as requested.

Christoph Päper wrote:
> *fantasai* <fantasai.lists@inkedblade.net>:
> 
> First of all, I don't think the comma is the best choice, because it's  
> already used in CSS for lists of ordered, mutual exclusive items.

The values in font-family aren't mutually-exclusive except on a character-
by-character basis. Similarly, the values in image backgrounds aren't
mutually-exclusive except on a pixel-by-pixel basis.

Providing multiple image formats would be, imho, best served by either
content negotiation or a url() syntax that can accept fallbacks.

>> background-image: url(foo), url(bar);
>> background-repeat: repeat-y, no-repeat;
> 
> 
> Would "bar" be visible at all with
> 
>   background-repeat: repeat, no-repeat;

If bar is partially transparent, yes.

> How can I set a property for the n-th background only?  

I don't think you can. Do you have a good use-case for it?

> Who needs multiple backgrounds for one box anyway?

Designers who are currently inserting extra <div>s to do the job.

http://www.alistapart.com/articles/slidingdoors/ avoids adding extra <div>s
because the elements being styled in this particular use case are already
paired up and the design only requires two images. (<a> + <li>)

~fantasai
Received on Wednesday, 1 December 2004 01:08:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT