Warning: include(/home/kosei27/www/culture27/culture27/inc/shared-google-analytics.php) [function.include]: failed to open stream: No such file or directory in /home/kosei27/www/culture27/blog/2011/04/z-index.php on line 15

Warning: include() [function.include]: Failed opening '/home/kosei27/www/culture27/culture27/inc/shared-google-analytics.php' for inclusion (include_path='.:/usr/local/php/5.2/lib/php') in /home/kosei27/www/culture27/blog/2011/04/z-index.php on line 15

Warning: include(/home/kosei27/www/culture27/culture27/inc/module-facebook-like-code.php) [function.include]: failed to open stream: No such file or directory in /home/kosei27/www/culture27/blog/2011/04/z-index.php on line 31

Warning: include() [function.include]: Failed opening '/home/kosei27/www/culture27/culture27/inc/module-facebook-like-code.php' for inclusion (include_path='.:/usr/local/php/5.2/lib/php') in /home/kosei27/www/culture27/blog/2011/04/z-index.php on line 31

IEのz-indexのバグを思い出す

つい最近、IE6ってz-indexのバグがあったよな...って思ったけど、ぼんやりとしか思い出せなかったので今さらですが検証してみました。。

結論としてはIE6だけじゃなくてIE7にも同じバグがありました。
2つのdivの親要素が別々でz-indexは指定しない場合、IE6とIE7以外のブラウザは子要素のz-indexの値が優先されるが、IE6とIE7は親要素の出現順が影響します。後から出現した親と子要素が手前になります。

デモページをみる

Google ChromeやFirefoxなどの場合

IE6とIE7の場合


Warning: include(/home/kosei27/www/culture27/culture27/inc/shared-body-end-js.php) [function.include]: failed to open stream: No such file or directory in /home/kosei27/www/culture27/blog/2011/04/z-index.php on line 104

Warning: include() [function.include]: Failed opening '/home/kosei27/www/culture27/culture27/inc/shared-body-end-js.php' for inclusion (include_path='.:/usr/local/php/5.2/lib/php') in /home/kosei27/www/culture27/blog/2011/04/z-index.php on line 104