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

Re: Multiple Background Images

From: Ted Shaneyfelt <tvs@hawaii.edu>
Date: Fri, 26 Nov 2004 09:53:31 -1000
To: Ben Ward <benmward@gmail.com>, dolphinling <dolphinling@myrealbox.com>, www-style@w3.org
Message-id: <001c01c4d3f1$9c699240$6401a8c0@maunakea>

> I think that the idea of a "background-z-index: foo;" (and associated
> shorthand) property has been suggested

Maybe we should be trying to address a more general need:
Allow multiple elements to occupy the same space, one rendered
over the top of the previous elements that share that space.

...
.top-frame {
  position: shared;
  background:url(top.png);
  background-position:top left;
  background-repeat: repeat-x;
  z-index: -2;
}
...
<div style='shared'>stuff</div>
<div class='top-frame'/><div class='right-frame'/>
<div class='bottom-frame'/><div class='left-frame'/>
...

It would be nice to control opacity of these overlapping elements as well.

The downside is of course that this seems to require those extra divs in the
source.  Perhaps there's a good compromise, like

<div class='top-frame right-frame bottom-frame left-frame'> stuff </div>

or something similar associated with a single class.  Ideas?

_-T
Received on Friday, 26 November 2004 19:57:27 GMT

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