サイト内検索

...HTML・XHTMLタグ...

table・セル

セルの間隔

セルの間隔は、table要素にcellspacing属性を指定します。
[使い方]
<table border="1" cellspacing="10">
cellspacing="" 整数の「ピクセル数(例・・"1")」
または
「パーセント(例・・"50%")」を指定します。

サンプル

《「cellspacing」の数値を「0」に指定した場合》

[bodyの中]

<table border="1" cellspacing="0">
<tr>
<th>No</th>
<th>No</th>
</tr>
<tr>
<td>No</td>
<td>No</td>
</tr>
</table>

[ブラウザ上]

NoNo
NoNo

《「cellspacing」の数値を「10」に指定した場合》

[bodyの中]

<table border="1" cellspacing="10">
<tr>
<th>No</th>
<th>No</th>
</tr>
<tr>
<td>No</td>
<td>No</td>
</tr>
</table>

[ブラウザ上]

NoNo
NoNo

Copyright c 2007.10.01 luc All rights reserved.