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

RE: Transparent absolutely positioned boxes overlapping

From: <Matthew.van.Eerde@hbinc.com>
Date: Wed, 18 Aug 2004 10:55:11 -0700
Message-ID: <61192FA29C719B469A2B13E57DEDF75B02CBFA0B@mail.hbinc.com>
To: <www-style@w3.org>

Hash: SHA1

Pyro wrote:
> ...
> should the hyperlinks of the underlying boxes function inside the
space of
> an overlapping box. 

No.  You reference CSS2 9.1.1, but I think the answer is found in
CSS2 14.2.1:
This property sets the background color of an element, either a
<color> value
or the keyword 'transparent', to make the underlying colors shine

That is, transparency is a purely VISUAL phenomenon.  The background
of the overlying box (the one with greater z-index) forms an
obstruction to the underlying boxes.  This obstruction is
transparent, so you can see through it, but it's still there, so you
can't click through it.

In this respect, Firefox's interpretation is accurate, and Internet
Explorer's is a bug.

Here's a quick test case:
{	position: absolute;
	left: 50px;
	top: 50px;
	width: 200px;
	height: 200px;
	z-index: 1;

	background-color: #eee;
	border: 2px solid green;

{	position: absolute;
	left: 25px;
	top: 25px;
	width: 250px;
	height: 250px;
	z-index: 2;

	background-color: transparent;
	border: 1px solid black;

<div id="under">
	under<br />
	<a href="javascript:alert('ERROR - should not be
clickable');">Should not be clickable</a>

<div id="over">

Matthew.van.Eerde@hbinc.com                      805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
Comment: pub key http://matthew.vaneerde.com/pgp-public-key.asc

Received on Wednesday, 18 August 2004 17:55:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:15 UTC