我與Possible to fill a table cell with a bg color?有同樣的問題。如何在網站地圖中設置背景色的CSS
問題是,我使用的是站點地圖,不知道如何設置td標籤的css。
(這工作正常,在Firefox和IE8,但不是IE7)
我用下面的CSS:
.subMenu
{
z-index: 100;
min-width: 118px;
border: solid 1px #545454;
text-align: center;
}
.subMenuItem
{
width: 100%;
min-width: 118px;
padding: 5px;
border-bottom: solid 1px #545454;
background-color: #4D97CB;
color: #DDDDDD;
text-align: center;
font-weight: bold;
font-size: 11px;
}
這給folloing HTML:
<div id="ctl00_mnuNavigationn1Items" class="ctl00_mnuNavigation_0 subMenu ctl00_mnuNavigation_7">
<table border="0" cellpadding="0" cellspacing="0">
<tr onmouseover="Menu_HoverDynamic(this)" onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)" id="ctl00_mnuNavigationn3">
<td>
<table class="subMenuItem ctl00_mnuNavigation_6" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="white-space:nowrap;width:100%;">
<a class="ctl00_mnuNavigation_1 subMenuItem ctl00_mnuNavigation_5" href="/Asidua.BPM.Web.WebApplication/Expenses/Default.aspx" style="border-style:none;font-size:1em;">Click here</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
乾杯,我明白了,更多的是我不確定如何在生成HTML時爲站點地圖中的td設置樣式。即CSS語法等。 – 2009-08-18 13:01:57
誰生成此代碼? – 2009-08-18 13:43:33