テーブルタグでwidthが反映されない

Test


0   名前: フノラン : 2006/07/12(水) 15:14  ID:wlNNY28U
<FORM method="POST" onsubmit="return chk_submit()">
<TABLE border=0 cellPadding=10 cellSpacing=0 width="100%">
<TR><TH ID=Header class="font-large align-center" width="20%">hoge</TH>
<TH ID=Header class="font-large align-center" width="80%">hogehoge</TH>
</TR>
</TABLE>
<HR>
<div id="div1" class="pane-height-small pane-width-large " style="OVERFLOW: hidden; HEIGHT: 60px">
<TABLE border=0 cellPadding=1 cellSpacing=2 width="100%" >
<TR>
<TH ID=pat1 noWrap align="middle" style="width:30">No</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:200">い</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:400">ろ</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:200">は</TH>
<TH id="pat1" noWrap class="font-medium align-center" style="width:90">に</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:50">ほ</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:100">へ</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:150">と</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:100">ち</TH>
<TH id="pat1" nowrap class="font-medium align-center" style="width:200">り</TH>
</TR>
</TABLE>
</div>





のようにしてテーブルを作成していきたいのですが、
width要素が%、ピクセル指定共にまったく機能せず、文字数に応じて均等に割り振られてしまいます。
スタイルシートは使用していません。
考えられる原因を教えていただけないでしょうか。
宜しくお願いします。

1   名前: あの : 2006/07/12(水) 15:14  ID:lKHRzitM
DOCTYPE宣言がstrictなのでは?

あとスタイルシートいっぱい使ってるように見えますが

2   名前: カヅサツ ◆ThCi95HEzw : 2006/07/12(水) 15:14  [URL]  ID:O5hEMlpW
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja" dir="ltr">
<head>
<title></title>
</head>
<body>
<FORM method="POST" onsubmit="return chk_submit()">
	<TABLE border=1 cellPadding=10 cellSpacing=0 width="100%">
		<TR>
			<TH ID=Header class="font-large align-center" width="20%">hoge</TH>
			<TH ID=Header class="font-large align-center" width="80%">hogehoge</TH>
		</TR>
	</TABLE>
	<HR>
	<div id="div1" class="pane-height-small pane-width-large"
		style="OVERFLOW: hidden; HEIGHT: 60px">
	<TABLE cellPadding="1" cellSpacing="2">
		<TR>
		<TH class="pat1" noWrap style="text-align:middle;width:30px;">No</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:200px">い</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:400px">ろ</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:200px">は</TH>
		<TH class="pat1" noWrap class="font-medium align-center" style="width:90px">に</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:50px">ほ</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:100px">へ</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:150px">と</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:100px">ち</TH>
		<TH class="pat1" nowrap class="font-medium align-center" style="width:200px">り</TH>
	</TR>
	</TABLE>
</div>
</body>
</html>



3   名前: フノラン : 2006/07/12(水) 15:14  ID:wlNNY28U
>DOCTYPE宣言がstrictなのでは?

調べてみたら正にその通りでした。。
いくらテーブル回りを調べてみてもうまくいかないはずです。
人の書いたソースを修正することの難しさを改めて思い知りました。

どうもありがとうございました。

4   名前: あの : 2006/07/12(水) 15:14  ID:lKHRzitM
あ、すみません
strictでもカヅサツさんのソースのようにきちんと正しく記述すれば動きますね

一覧へ戻る