Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTML テーブルの幅と高さをミリメートル単位で指定する方法はありますか?
<table border="1"> <tr width="17mm"> <td>gukgu</td> <td>gukgu</td> </tr> </table>
これは機能しますか?
はい、ミリ単位で幅を設定できます。ただし、<tr>要素に幅を設定しても、通常は何も起こりません。代わりに、このスタイルをテーブルに追加することを検討してください。width:17mm; table-layout:fixed
<tr>
width:17mm; table-layout:fixed
を使用できますがcss、印刷にのみお勧めします。画面に表示するにはem、pxまたはを使用します%。
css
em
px
%
<table border="1"> <tr> <td style="width: 17mm;">gukgu</td> <td style="width: 17mm;">gukgu</td> </tr> </table>
マニュアルを見る
デモを見る