W3C home > Mailing lists > Public > www-style@w3.org > June 2003

Layered presentation on a single element

From: Josh Hughes <josh@deaghean.com>
Date: Sun, 22 Jun 2003 15:49:29 -0400
To: www-style@w3.org
Message-ID: <oprq6pcrl8llcpg3@mail.deaghean.com>

It's probably been suggested before, but I think there should be some 
method to "layer" styles on a single element. You could use something 
similar to z-index:

h1:layer(0) {
	width: 100px;
	height: 100px;
	background-image: url("images/foo.gif");
}

h1:layer(-1) {
	display: none;
}

<h1>This text will not display. 100x100 foo.gif will show in its place</h1>

Basically 0 would be the default, negative numbers would inside the 
element, and positive would be outside. The idea is to solve the same 
problem Dave Hyatt does with XBL 
(http://weblogs.mozillazine.org/hyatt/archives/2003_05.html#003257), but 
without the binding (which seemed like way too much extra text if you're 
just trying to get rid of a couple spans in your HTML).

Forgive me if this is a rehash,

Josh Hughes
Received on Sunday, 22 June 2003 15:49:04 GMT

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