2013-06-30 79 views
0

IE9 IE9的div佈局/定位dfferent在Chrome Vs的FF和IE

火狐V22 enter image description here

最新的Chrome 27.0 ... enter image description here

所以你可以看到它是相當相同的位置在IE & FF但不知何故鉻是在自己的域

代碼是:

 <div id="DivLogRegForm" style="background-image: url('images/RegF.png'); background-repeat: no-repeat; width: 411px; height: 316px;"> 
      <div id="DivF_All" style="position:relative; top:70px;"> 
       <div id="DivF_User" style=" position:relative;top:13px; padding: 0 0 0 0; margin:0 0 0 0"> 
        <input type="text" id="TBX_USER" style="width:205px;" /> 
       </div> 
       <div id="DivF_Pass" style=" position:relative;top:37px; padding: 0 0 0 0; margin:0 0 0 0"> 
        <input type="password" id="TBX_Pass" style="width:205px;" /> 
       </div> 
       <div id="DivF_ConfPass" style=" position:relative;top:57px; padding: 0 0 0 0; margin:0 0 0 0"> 
        <input type="password" id="TBX_ConfPass" style="width:205px;" /> 
       </div> 
       <div id="DivF_Email" style=" position:relative;top:80px; padding: 0 0 0 0; margin:0 0 0 0"> 
        <input type="text" id="TBX_Email" style="width:205px;" /> 
       </div> 
      </div> 
     </div> 

一開始我嘗試不加0保證金&填充,但即使如此,它沒有任何區別

任何建議,我怎麼可能使它同在所有這些(這些瀏覽器的ATLEAST 3)?

+2

因此,每個文本字段的需要進行像素完美定位在背景圖像的工作?這非常脆弱。只需使用框陰影來實現這一效果。 – Ryan

回答

1

http://jsfiddle.net/Jr2dB/1/

  <div id="DivLogRegForm" style="background-image: url('images/RegF.png'); background-repeat: no-repeat; width: 411px; height: 316px;"> 
     <div id="DivF_All" style="position:relative; top:70px;"> 
      <div id="DivF_User" style=" position:absolute;top:13px; padding: 0 0 0 0; margin:0 0 0 0"> 
       <input type="text" id="TBX_USER" style="width:205px;" /> 
      </div> 
      <div id="DivF_Pass" style=" position:absolute;top:37px; padding: 0 0 0 0; margin:0 0 0 0"> 
       <input type="password" id="TBX_Pass" style="width:205px;" /> 
      </div> 
      <div id="DivF_ConfPass" style=" position:absolute;top:57px; padding: 0 0 0 0; margin:0 0 0 0"> 
       <input type="password" id="TBX_ConfPass" style="width:205px;" /> 
      </div> 
      <div id="DivF_Email" style=" position:absolute;top:80px; padding: 0 0 0 0; margin:0 0 0 0"> 
       <input type="text" id="TBX_Email" style="width:205px;" /> 
      </div> 
     </div> 
    </div> 

這裏似乎也同樣打破了不同的瀏覽器 但現在你可以解決它

+0

http://h.web.rcl.co.il/images/RegF.png –

+0

謝謝,它確實有幫助 –