2012-10-24 20 views
0

中工作我正在構建的網站的管理員登錄表單不適用於Chrome,但它在IE中正常工作。什麼可能導致這個?我在這裏發現了另一個關於類似問題的其他問題,但其答案對我並不適用。HTML表單字段在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; 
} 
+1

移除您的身體的z-index CSS中 –

回答

2

刪除#bodyposition: relative;它將工作

你可以看到光標及其在鍍鉻也在firefox和safari中測試

enter image description here

+0

啊!謝謝:)你介意爲什麼要這樣做嗎? – Jeremy

+0

@Jeremy非常歡迎您檢查http://css-class.com/test/css/visformatting/layers/z-index.htm和http://www.onextrapixel.com/2009/05/29/an-indepth -coverage-on-css-layers-z-index-relative-and-absolute-positioning /有很好的..你會更容易理解和更有效 –

0

你需要從-1身體改變你的Z指數的CSS一些積極的東西

body { 
    z-index: 1111; 
} 
1

而是定位#body得到它下面#nav,你應該定位#nav將高於#body

#body { position:relative; z-index:-1; ... }

#nav{ 
    position: relative; 
    z-index: 1; 
} 
相關問題