簡體   English   中英

無法在Chrome中使用的HTML表單字段,可在IE中使用

[英]HTML form fields not usable in chrome, works in IE

我正在建立的網站的管理員登錄表單無法在chrome中使用,但在IE中可以正常使用。 是什么原因造成的? 我在這里找到了另一個關於類似問題的問題,但是它的答案對我不起作用。

預覽: http//a.emutek.net/site/admin/

HTML:

<div id="body">
        <div class="divhead" id="adminhead">Login to website management:</div>
        <div id="adminlogin">
            <form name="adminlogon" action="login.do.php" method="post">
                <table border="0">
                    <tr>
                        <td>
                            Username: 
                        </td>
                        <td>
                            <input type="text" name="user">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Password: 
                        </td>
                        <td>
                            <input type="password" name="pwd">
                        </td>
                    </tr>
                    </table>
                <input type="submit" value="Submit">
            </form>
        </div>
</div>

CSS:

    #body {
        z-index: -1;
        position: relative;
        top: -6px;
        padding: 7px;
        background-color: white;
        border-radius: 6px;
}

.divhead{
    background-color: #111;
    color: #CCC;
    text-transform: uppercase;
    font: bold 12px Arial, Helvetica;
    text-decoration: none;
    padding: 3px;
    margin-bottom: 5px;
    border-radius: 6px;
}
#head{
    border-radius: 6px;
    margin-bottom: -10px;
    padding: 5px;
    background-image:url('../img/bg_header.png');   
}
#adminlogin{
    margin-left: 40%;
    z-index: 10;


}
#adminhead{
    margin-top: 20px;
    margin-bottom: 10px;
    width: 700px;
    margin-right: auto;
    margin-left: auto;
    padding-left: 20px;
}

取消position: relative; #body它將起作用

您可以看到光標在chrome中也經過了Firefox和Safari的測試

在此處輸入圖片說明

相反定位的#body得到它下面#nav ,你應該定位#nav將高於#body

#body { 職位:相對; z索引:-1; ...}

#nav{
    position: relative;
    z-index: 1;
}

您需要將體內的z索引CSS從-1更改為正數

body {
    z-index: 1111;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM