white-space

Win IE5Win IE5.5Win IE6Mac IE4.5Mac IE5NN4N6N7Win O6
pre×××
nowrap×××


テーブル内での折り返しを禁止するには、th,td,要素にnowrap属性を一つずつ書いていくよりも、CSS一行でOKです。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<META http-equiv="Content-Style-Type" content="text/css">
<title>セル内での折り返しを禁止する</title>
<style type="text/css">
<!--
h1 { font: bold 1.5em "Courier New"; }
th, td { white-space: nowrap; }
-->
</style>
</head>
<body>

<h1>white-space</h1>

<table border="1">
<tr><th></th><th>Win IE5</th><th>Win IE5.5</th><th>Win IE6</th><th>Mac IE4.5</th><th>Mac IE5</th><th>NN4</th><th>N6</th><th>N7</th><th>Win O6</th></tr>
<tr><td>pre</td><td>×</td><td>×</td><td>○</td><td>×</td><td>○</td><td>○</td><td>○</td><td>○</td><td>○</td></tr>
<tr><td>nowrap</td><td>×</td><td>○</td><td>○</td><td>×</td><td>○</td><td>×</td><td>○</td><td>○</td><td>○</td></tr>
</table>
<P><BR>
テーブル内での折り返しを禁止するには、th,td,要素にnowrap属性を一つずつ書いていくよりも、CSS一行でOKです。</P>
<P><BR>
</P>
</body>
</html>