當發佈爲HTML時,DITA Open Toolkit會自動創建一些內聯表格屬性,包括frame =「border」和rules =「all」。如何使用CSS覆蓋HTML「規則」屬性?
我需要使用單元格的CSS樣式來覆蓋這個「規則」屬性,雖然我可以在IE和Chrome中獲得所需的結果,但是Firefox會在表格中放置純黑色網格線,並拒絕就此事發表意見。
很顯然,我不能編輯HTML,公司政策是不編輯XSLT,那麼如何才能使用CSS單獨刪除這些網格線呢?
我已經嘗試過各種狡猾的border-xxxxxx樣式組合,並給出它們!重要聲明不起作用。
的HTML說...
<table cellpadding="4" cellspacing="0" frame="border" border="1" rules="all">
<thead>
<tr>
<th class="cellrowborder">Type </th>
<th class="cellrowborder">Comment </th>
</tr>
</thead>
<tbody>
<tr>
<td class="cellrowborder">Caution </td>
<td class="cellrowborder">Think twice. </td>
</tr>
<tr>
<td class="cellrowborder">Attention </td>
<td class="cellrowborder">Be careful. </td>
</tr>
<tr>
<td class="cellrowborder">Danger </td>
<td class="cellrowborder" >Be scared. Be very scared. </td>
</tr>
</tbody>
</table>
的CSS說
table {border: 1px solid black;
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
font-size: 9pt;
margin-top: 1em;
margin-bottom: 1em;
padding: 4px;}
tr {border: none;}
.cellrowborder {border: none;}
因此,儘管它看起來我在IE預期,但它不能在Firefox,除非我刪除這些幀/ border/rules屬性。我無法生產。
只有在Webkit中,不是Firefox – ajcw 2012-02-13 15:16:51
在Firefox中適用。 – reisio 2012-02-13 21:55:30
請給出一個在Firefox中工作的例子。這不在FF10中 - http://jsfiddle.net/ajcw/GYYHb/ – ajcw 2012-02-14 08:35:57