2014-01-10 36 views
0

這裏有thast我發瘋在Chrome中浮動Div錯誤?

enter image description here

一個問題,如果你在 Chrome,但不能在Firefox看起來有..形式被按下。

我想清楚兩者溢出隱藏..

下面是代碼的

<div style="margin: auto; width: 900px; padding:15px; overflow:hidden;"> 
    <div style="position:relative;float:right;margin-top:10px; right:5%;padding-right:20px;"> 
     <center> 
     RIGHT SIDE 
     </center> 
     <div class="testimonials">BLA BLA</div>   
    </div> 
    <form novalidate action="" id="mainform" method="post"> 
    <input type="hidden" value="<?=$affId;?>" name="affilate" > 
    <input type="hidden" value="<?=$PurchaseType;?>" name="PurchaseType" id="PurchaseType">  
    <table style="width:820px;"> 
     <colgroup> 
     <col style="width:128px;"> 
     <col style="width:337px;"> 
     <col style="width:20px;"> 
     <col style="width:255px"> 
     </colgroup> 
    </table> 
    </form> 
<br class="clear" /> 
</div> 

任何幫助表示讚賞

感謝外殼!

+0

您的代碼外殼根本不像您的問題,特別是因爲您有一堆標籤未關閉。你可以讓一個jsfiddle展示你的問題? –

+0

hm,html驗證?在某些情況下,一個失蹤的結束div左右 – chris

+0

根據我的經驗,在某些情況下,chrome會計算更多1px。嘗試改變寬度減少1 px,看看它是否有幫助。我的意思是下降的部分是1px。 – 2014-01-10 21:56:17

回答

0

如果兩邊的邊距爲8px,表格不適合,我會將聲明的寬度計數到885px,如果邊距爲8px,則900px可用。您已將表單邊距保留爲默認的瀏覽器設置。

<style> 
#mainform { 
padding:0; 
margin:0; 
} 
</style> 

和(更新請),改變

right:5%; 
/* to */ 
right:45px; 

做個錯誤WebKit中http://css-tricks.com/percentage-bugs-in-webkit/

更新

表還可以有餘量。

<style> 
* { 
margin:0; 
padding:0; 
} 
</style> 
+0

並感謝提示去找我:) – 2014-01-10 22:09:12

0
我有同樣的問題

,這個問題是因爲我用margin-top:10px對鉻這是造成問題。您可以嘗試使用padding-top:10px