2010-05-17 81 views
1

我有兩個元素,都與位置:絕對風格。第一個桌面是負責某種佈局的東西,有寬度:100%,而第二個顯示一些輸入控件,並有寬度:400px並居中。兩個表位置:絕對問題

在IE中遇到問題:第一個表似乎覆蓋第二個表,例如我無法使用鼠標將焦點設置到我的輸入元素中。另外,當我使用開發工具玩,並嘗試檢查輸入元素時,通過點擊它,實際獲得檢查的元素首先是元素。我必須使用TAB將焦點設置爲輸入元素。

一切工作正常在FF &鉻&歌劇。

任何想法是怎麼回事?我試圖玩Z指數:沒有幫助。

由於

編輯:那些表:

表1

<table width="250" id="loginbox" style="z-index: 1001; position: absolute; left: 706.5px; top: 150px;"> 
<tbody> 
    <tr> 
     <td>Username:</td> 
     <td width="150" style="text-align: right;"> 
      <input type="text" style="width: 150px;" class="brandBorder" id="username" name="username"> 
     </td> 
    </tr> 
    <tr> 
     <td>Password:</td> 
     <td> 
      <input type="password" style="width: 150px;" class="brandBorder" id="password" name="password"> 
     </td> 
    </tr> 
    <tr> 
     <td align="right" colspan="2"> 
      <input type="submit" class="button" id="LoginButton" value="Login" name="LoginButton"> 
     </td> 
    </tr> 
    <tr> 
     <td align="center" colspan="2"> 
      <br> 
      <br> 
      <span class="error" id="msg"></span> 
     </td> 
    </tr> 
</tbody> 

表2

<table style="right: 0px; left: 0px; margin: 0px; width: 100%; position: absolute; top: 0px;"> 
    <tbody><tr> 
     <td style="background-image: url('login-tbg.gif'); width: 499px; background-repeat: repeat-x; height: 60px;"> 
      <img border="0" src="login-lt.gif"> 
     </td> 
     <td align="left" style="background-image: url('login-tbg.gif'); width: 30%; background-repeat: repeat-x; height: 60px;"> 
     </td> 
     <td style="background-image: url('login-tbg.gif'); width: 15px; background-repeat: repeat-x; height: 60px;"> 
      <img border="0" src="login-tm.gif"> 
     </td> 
     <td align="right" style="background-image: url('login-tr.gif'); width: 30%; background-repeat: repeat-x; height: 60px;"> 
      <br> 
      <img border="0" src="login-right.gif">&nbsp; 
     </td> 
    </tr> 
    <tr style="height: 99%;"> 
     <td valign="top" align="center" style="height: 99%;" colspan="3"> 
     </td> 
     <td class="loginsidebar"> 
     </td> 
    </tr> 
</tbody> 

而這些表格坐在表單元素中彼此相鄰。請,不要告訴我,它應該在DIV等... :)我知道它:)

+0

你能提供任何額外的代碼? – Andrew 2010-05-17 18:21:40

+0

好的,請欣賞表格代碼 – dragonfly 2010-05-18 07:43:00

+0

哪個版本的IE給你帶來麻煩? – mcandre 2010-05-25 17:08:47

回答