通过在IE中单击无法访问z-index的文本输入

时间:2011-03-16 15:31:15

标签: css internet-explorer forms

我有一个无边框文本输入和一个悬停在其他图形上方的图像输入。你可以在这里看到它:http://www.wwmlaw.dreamhosters.com/index.php

你可以在IE6和IE8中输入文本输入,它会接受输入然后点击它就不会给你一个光标。所有其他测试的浏览器都可以。

CSS就像这样:

#homeSearchForm {
    position:absolute;
    z-index:1000;
}

#homeSearch {
    position:absolute;
    z-index:1000;
    width:230px;
    height:20px;
    border:none;
    top:16px;
    _top:14px;
    left:676px;
    _left:730px;
    border:none;
    background:none;
    color:#FFF;
}

#homeSearchButton {
    position:absolute;
    z-index:1000;
    width:55px;
    height:20px;
    border:none;
    top:17px;
    _top:15px;
    left:600px;
    _left:655px;
}

有什么想法吗?

2 个答案:

答案 0 :(得分:1)

基于这个问题

Input boxes with transparent background are not clickable in IE8

我添加了一个仅IE背景图片:

<!--[if IE]>
<link href="css/IE.css" rel="stylesheet" type="text/css" />
<![endif]-->

background-image:url(../g/spacer.gif); 

这解决了这个问题。

JG

答案 1 :(得分:1)

有类似的问题 - &gt; IE8文本框不可编辑(当我的应用程序的包装器具有位置:绝对时)。单击仅在边框中工作。填充颜​​色和透明也没有工作。通过此doctype更改,问题已修复。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

来源:http://www.codingforums.com/showthread.php?p=1173375#post1173375