2017-08-20 57 views
0

,re這在eBay上:http://www.ebay.com/itm/281670060888一個DIV下方,而不是右邊其他

自己的網站上(在http://sallymilo.com/template-din.html)和我自己的電腦上運行時,右側格對齊到左側頂部但是當我把它放在eBay上時,右側的div在左下方 - 即使我將標籤部分縮小了200像素。

主CSS的位:

.row1 { width:100%; position:relative; float:left; background:url(https://myimagefiles.com/dinnerman/tbg.png); } 
.row1l { width:26%; position:relative; margin-left:2em; float:left; } 
.row1r { width:64%; position:relative; margin-left:2em; margin-right:2em; float:left; } 

和位的選項卡式部分CSS的:

.tabholder { width:100%; height:14em; font-size:16px; } /* base font size for em-scaling */ 
.tabholder div.tabtops { width:100%; max-width:550px; } 
+0

爲什麼您使用的浮球隨位置?與相對位置,你可以使它在任何你想要的...只是通過使用左上和右上 –

+0

我建議刪除.row1r的margin-right和或減少寬度下降到63% –

回答

0

的問題是,在易趣容器的寬度比1000px低。 因爲你的內部部分硬編碼寬度,他們打破。

我建議你使用寬度%,這樣無論容器的內容是什麼,內部部分都會用你給出的百分比數。

.container { 
 
margin: 20px; 
 
background-color: rgba(0,0,0,0.2); 
 
overflow: hidden; 
 
} 
 

 
.col-1 { 
 
width: 20%; 
 
background-color: rgba(0,0,0,0.2); 
 
float: left; 
 
} 
 

 
.col-2{ 
 
width: 80%; 
 
background-color: rgba(0,0,0,0.5); 
 
float: left 
 
}
<div class="container"> 
 
<div class="col-1">col-1</div> 
 
<div class="col-2">col-2</div> 
 
</div>

+0

謝謝!儘管我調整了2個問題div的寬度,但將模板從1000縮小到950 px是主要的東西。 –

相關問題