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

Re: Effect of 'position:relative' on 'table-*' display values

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Thu, 27 Nov 2008 15:46:39 -0800
Message-ID: <c9e12660811271546j6469dc0ei1309dfc2e018d0a2@mail.gmail.com>
To: "James Hopkins" <james@idreamincode.co.uk>
Cc: www-style@w3.org

On Thu, Nov 27, 2008 at 8:36 AM, James Hopkins <james@idreamincode.co.uk> wrote:
>



> Has there been talk of a resolution for this issue? What with the arrival of
> IE8 (which supports all these values), there's currently a lot of talk
> around about authors realistically being able to use these values for their
> layouts. However, I do believe without clarification this issue is going to
> limit the use of the 'table-*' values somewhat. FYI, FF3, Opera and Safari
> all ignore 'position:relative' in the aforementioned context.
>

That is not true. While top and left values may not apply, we can see
that the browser does handle positioned td elements differently.

<!DOCTYPE html>
<html lang="en">
<head>
	<title>Untitled</title>
</head>
<body>
<h1>click to see offsetParent</h1>
<table border='1'>
<tr><td><div style="position:relative"
onclick="alert(this.offsetParent)">not positioned td</div></td></tr>
</table>

<hr>
<table border='1'>
<tr><td style="position:relative">
<div style="position:relative"
 onclick="alert(this.offsetParent)">positioned td</div>
</td></tr>
</table>
</body>
</html>

Result:
FF3, Opera 9.6:
 BODY
 TD

Safari 3:
  BODY
  BODY

Garrett
Received on Thursday, 27 November 2008 23:47:33 GMT

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