offsetParent のバグ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script src="../lib/jquery/jquery_1_2_6.js"> </script> <script> jQuery(function($j){ alert($j('div.test1').offsetParent().attr('tagName'))//Fx:body IE:td alert($j('div.test2').offsetParent().attr('tagName'))//Fx:td IE:td }) </script> <style> td{ position:relative; background:#eee; } div.test1{ position:absolute; } div.test2{ position:static; } </style> </head> <body> <table> <td><div class="test1">test1</div></td> <td><div class="test2">test2</div></td> </table> </body> </html>
td の relative は当てにしない