以下為瀏覽器firefox,ie默認設置:
table {
display: table;
border-spacing: 2px; /*border-spacing 屬性設置相鄰單元格的邊框間的距離(僅用于“邊框分離”模式)。在指定的兩個長度值中,第一個是水平間隔,第二個是垂直間隔。*/
border-collapse: separate; /* 除非 border-collapse 被設置為 separate,否則將忽略這個屬性。 */
margin-top: 0;
margin-bottom: 0;
text-indent: 0;
}
td {display:table-cell;padding:1px;text-align:inherit;vertical-align:inherit;}
*****************************************
<td colspan="value"> :設置單元格可橫跨的列數。rowspan:橫跨的行數。span:跨度,兩個界限之間的距離。
*****************************************
<table border="1"> /* DW頁面設計中顯示正常 */
<tr>
<td width="26">td</td>
<td width="139">td</td>
<td width="60">td</td>
</tr>
</table>
<table border="1"> /* DW頁面設計中顯示不正常 */
<tr>
<td style="width:26px;" >s</td>
<td style="width:139px;" >s</td>
<td style="width:60px;">s</td>
</tr>
</table> /* DW頁面設計中顯示不正常,推薦使用,節約代碼 */
</table>
<table border="1">
<colgroup>
<col width="26" />
<col width="139" />
<col width="60" />
</colgroup>
<tr>
<td >c</td>
<td >c</td>
<td >c</td>
</tr>
</table>
posted on 2009-10-16 15:56
紫蝶∏飛揚↗ 閱讀(813)
評論(0) 編輯 收藏 所屬分類:
CSS 、
div+css+js代碼