2014-02-25 473 views
0

我試圖做一個很好看的ebay列表,雖然html看起來不錯,但ebay之外,表格似乎打破和mis-align後被預覽/發佈易趣在ebay列表上沒有正確對齊的HTML/CSS表格

這是它看起來像預覽在Chrome

enter image description here

這是它看起來像預覽在易趣預覽框中

enter image description here

當然,這並不是完整的清單,但除了那些部分外,其他所有東西似乎都是正確對齊的。

<table id="Table1" border="0" cellpadding="0" cellspacing="0"> 
    <tbody> 
     <tr> 
      <td colspan="8"> 
       <img src="http://i.imgur.com/K2yWDPk.png" width="920" height="25" border="0" alt="Top Shadow"> 
      </td> 
     </tr> 
     <tr> 
      <td rowspan="2" colspan="2"> 
       <a href="STORELINK"> 
        <img src="http://i.imgur.com/5u3mlVA.png" border="0" alt="Logo" width="230" height="100"> 
       </a> 
      </td> 
      <td colspan="2" rowspan="2" border="0"> 
       <img src="http://i.imgur.com/LkCBdLv.png" height="100" width="230"> 
      </td> 
      <td colspan="4" background="http://i.imgur.com/4xTnFGE.png" width="460" height="50"> 
       <div id="Table1Links"> 
        <a href="STORELINK">Store</a> 
       </div> 
      </td> 
     </tr> 
     <tr> 
      <td colspan="4" background="http://i.imgur.com/Mm6XcLE.png" width="460" height="50"> 
       <form name="search" method="get" action="http://search.stores.ebay.com/search/search.dll" target="_blank"> 
        <!-- Replace with # with STOREID --> 
        <input name="sid" value="#REPLACEWITHSTOREID" type="hidden"> 
        <input name="srchdesc" value="y" type="hidden"> 
        <input name="fp" value="0" type="hidden"> 
        <input name="query" size="30" maxlength="300" type="text"> 
        <input value="Search Store" name="submit" src="http://i.imgur.com/0uSF8nO.png" type="image"> 
       </form> 
      </td> 
     </tr> 
    </tbody> 
</table> 

任何關於如何讓它正確顯示的建議將不勝感激!謝謝

+0

嘗試啞下來HTML儘可能然後使用內聯的樣式表的樣式的元素。 – APAD1

+0

他們允許CSS背景嗎? –

+0

他們這樣做,但我不認爲你可以這樣做,因爲我花了那麼多時間在eBay上市:P – APAD1

回答

0

嘗試將樣式表放置在ebay模板中,它的自我代碼在<style></style>標記的開頭。

然後將此代碼添加到您的樣式

#mainpage { 
    margin: 0; 
    padding: 0; 
} 

那麼表標籤改變了這一點。這對我有用。讓我知道它是否有效,或者您需要任何幫助,或者是否需要更多信息。

<TABLE style="WIDTH: 100%" id=mainpage border=1 cellSpacing=0 cellPadding=0 cols=5> 
0

這可能是因爲易趣將所有這些惱人的「&nbsp;」在格式化代碼間隔標籤 - 嘗試非格式的代碼(是的,手動採取了所有的選項卡/空間,只是使用回車鍵分開的東西)。

我簡直就是經歷過這個 - 在發現它沒有正確對齊之後感到非常惱火 - 但是因爲我沒有格式化代碼(我在提交給eBay後至少有一百萬 標籤),事情是如何流動的 - 而且這些標籤都不會在任何地方生成!

祝你好運!