我做了一個簡單的HTML頁面,其上顯示圖像作爲標題。問題是圖像不重複。背景重複不起作用
當我將width
設置爲100%
時,td(side
)消失。 如果我從basestrip
刪除width
,那麼它只覆蓋屏幕區域的一半。我想要覆蓋具有指定高度的圖像的所有屏幕。
<table cellpadding="0" cellspacing="0">
<tr>
<td id="side" width="10px" height="25px"></td>
<td></td>
<td id="basestrip" width="100%" height="25px">
</td>
</tr>
</table>
這是CSS:
#side {
background-color: #014160;
}
#basestrip {
background-image: url('../Images/topstripbg.png');
background-repeat: repeat-x;
}
財產你嘗試過將背景圖像到'tr'元素,而不是'td'? – Aaron 2011-12-21 06:11:44
你在佈置一個使用表格的網站?另外,給#basetrip寬度爲90%,#寬度爲8%,看看側面是否停留。 – Indranil 2011-12-21 06:13:55
也檢查圖像路徑是否正確,可能是它沒有加載圖像.. – 2011-12-21 06:18:24