サイト内検索

...HTML・XHTMLタグ...

table

回りこみの解除

回りこみを解除するには、br要素にclear属性を指定します。
[使い方]
<br clear="all">
[メモ・・・W3Cの検証サービス・・・]
HTML 4.01 Strict ・ XHTML1.0 Strictでは、推奨されていませんので、
Validするには、スタイルシートを使用します。
clearプロパティを指定します。
.sample{clear: both:}
属性 属性値 説明
clear= "left"表の右側にあるテキストの回り込みを解除します。
"right"表の左側にあるテキストの回り込みを解除します。
"all"どちらの回り込みも解除します。

サンプル

[bodyの中]

<table border="1" align="left" width="200" height="70">
<tr>
<th>No</th>
<th>No</th>
</tr>
<tr>
<td>No</td>
<td>No</td>
</tr>
</table>
align="left"を指定します。
<br clear="all">
br clear="all" を使って、回り込みを解除します。

clear: both:を指定

[bodyの中]

<table border="1" style="float:left; margin-left:auto; height: 70px;" width="200">
<tr>
<th>No</th>
<th>No</th>
</tr>
<tr>
<td>No</td>
<td>No</td>
</tr>
</table>
「float:left; margin-left:auto;」

指定しています。
<br style="clear: both;">
を指定して、回り込みを解除します。

[ブラウザ上]

NoNo
NoNo
「float:left; margin-left:auto;」

指定しています。

<br style="clear: both;">
を指定して、回り込みを解除します。

Copyright c 2007.10.01 luc All rights reserved.