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

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 UTC