...

View Full Version : select tag z-index bug



kuse50
07-14-2008, 10:56 AM
I have the following code:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>How to fix this in IE</title>
<style>
* {
margin:0;
padding:0;
font-family:arial,serif;
font-size:12px;
}
div.outer {
position:absolute;
background:#fc0;
width:250px;
height:100px;
z-index:999;
}
div.inner {
top:50px;
left:50px;
position:absolute;
background:#f00;
width:100px;
height:100px;
z-index:1;
}
</style>
</head>
<body>
<h1>Please take a look this file in Internet Explorer &amp; Mozilla Firefox, how can they're so different?</h1>
<h1>Why in IE I can't cover the Test_option (tag select &amp; option) width div outer??</h1>

<div class="outer">
div outer to cover the Test_Option
</div>
<div class="inner">
<form>
<select><!-- this select-option should covered by div outer,except in IE -->
<option>Test_Option</option>
</select>
<input type="submit" /><!-- this button should covered by div outer -->
</form>
</div>

</body>
</html>

but not work well in both firefox and IE, does anyone know how to fix??

abduraooft
07-14-2008, 12:17 PM
See http://www.throbs.net/web/articles/IE-SELECT-bugs/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum