I am trying to stack two inputs on top of each other in HTML. In most browsers (Safari, FF, IE7) I do this with the following code, and it works fine, so the second input is placed on top of the first with a lighter text color, and when you click in the area, the focus is on It. However, in IE8, the first appears to be above the second, so when you click on it and start typing, you see light colored text.
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<style type="text/css" media="screen">
input {
background-color: transparent;
}
</style>
</head>
<body>
<input style="position:absolute;z-index: 1;color: #dedede;">
<input type="text" style="position:relative;z-index: 3;">
</body>
</html>
source
share