
tableの中に更にtableを作りたいのですが、内側のtableが上のほうに配置されず真ん中に出てしまいます。valign=topを使ったのですがうまくいきません。何か方法はありますでしょうか?
<table height=500>
<tr><td>
---------- ここと ------------
<table height=250> <tr><td></td></tr>
<tr><td></td></tr>
</table>
---------- ここにかなりスペースが出来てしまう(*_*)
</tr></td>
</table>
A 回答 (6件)
- 最新から表示
- 回答順に表示
No.4
- 回答日時:
不要な全角スペースを全て削除してください。
No.3
- 回答日時:
tableタグにcellpadding="0"とcellspacing="0"を追加して下さい。
<table cellpadding="0" cellspacing="0">
この回答への補足
実際のタグはこんな感じなんですが、bgcolor=#ffffffの中の6個の
table(box)をより近づけたいのですが・・・ 素人なものでご教授ください。
<HTML>
<HEAD>
<TITLE>sample</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-sjis">
<BODY bgcolor=#000000 topmargin="0">
</head>
</HEAD>
<table width=592 align=center CELLPADDING=0 CELLSPACING=0 valign=top>
<tr><td bgcolor=#000000>
<TABLE WIDTH=592 BORDER=0 CELLPADDING=0 CELLSPACING=0 valign=top>
<TR><TD><A Href="../index.html"><Img Src="logo1.jpg" Width="592" Height="30" border=0></A></td></TR>
<TR><TD><Img Src="logo3_01.jpg" Width="102" Height="26" border=0><Img Src="logo3_02.jpg" Width="99" Height="26" border=0><Img Src="logo3_03.jpg" Width="99" Height="26" border=0><Img Src="logo3_04.jpg" Width="100" Height="26" border=0><Img Src="logo3_05.jpg" Width="91" Height="26" border=0><Img Src="logo3_06.jpg" Width="101" Height="26" border=0></TD></TR>
<TR><TD Width="592" Height="401"><Img Src="mame2_01.jpg" Width="592" Height="401"></TD></TR>
<TR><TD WIDTH=592 valign=top bgcolor=#ffffff>
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top >
<!-- 1 -->
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A valign=top></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887 valign=top><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A valign=top></Td></Tr>
<Tr><Td colspan=2 valign=top><br></Td></Tr>
</table>
<!-- 2 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 3 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 4 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 5 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</Table>
<!-- 6 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</Table>
</td></tr>
</table>
</BODY>
</HTML>
No.2
- 回答日時:
<tr>と<td>がタグが反対です。
インデントをきっちり付けないとミスが増えますよ。
<table height=500 border="1">
<tr>
<td valign="top">
<table height=250 border="1">
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
この回答への補足
実際のタグはこんな感じなんですが、bgcolor=#ffffffの中の6個の
table(box)をより近づけたいのですが・・・ 素人なものでご教授ください。
<HTML>
<HEAD>
<TITLE>sample</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-sjis">
<BODY bgcolor=#000000 topmargin="0">
</head>
</HEAD>
<table width=592 align=center CELLPADDING=0 CELLSPACING=0 valign=top>
<tr><td bgcolor=#000000>
<TABLE WIDTH=592 BORDER=0 CELLPADDING=0 CELLSPACING=0 valign=top>
<TR><TD><A Href="../index.html"><Img Src="logo1.jpg" Width="592" Height="30" border=0></A></td></TR>
<TR><TD><Img Src="logo3_01.jpg" Width="102" Height="26" border=0><Img Src="logo3_02.jpg" Width="99" Height="26" border=0><Img Src="logo3_03.jpg" Width="99" Height="26" border=0><Img Src="logo3_04.jpg" Width="100" Height="26" border=0><Img Src="logo3_05.jpg" Width="91" Height="26" border=0><Img Src="logo3_06.jpg" Width="101" Height="26" border=0></TD></TR>
<TR><TD Width="592" Height="401"><Img Src="mame2_01.jpg" Width="592" Height="401"></TD></TR>
<TR><TD WIDTH=592 valign=top bgcolor=#ffffff>
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top >
<!-- 1 -->
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A valign=top></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887 valign=top><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A valign=top></Td></Tr>
<Tr><Td colspan=2 valign=top><br></Td></Tr>
</table>
<!-- 2 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 3 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 4 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 5 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</Table>
<!-- 6 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</Table>
</td></tr>
</table>
</BODY>
</HTML>
No.1
- 回答日時:
<table height=500>
<tr><td valign="top">
---------- ここと ------------
valign で上になると思いますが?
この回答への補足
実際のタグはこんな感じなんですが、bgcolor=#ffffffの中の6個の
table(box)をより近づけたいのですが・・・ 素人なものでご教授ください。
<HTML>
<HEAD>
<TITLE>sample</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-sjis">
<BODY bgcolor=#000000 topmargin="0">
</head>
</HEAD>
<table width=592 align=center CELLPADDING=0 CELLSPACING=0 valign=top>
<tr><td bgcolor=#000000>
<TABLE WIDTH=592 BORDER=0 CELLPADDING=0 CELLSPACING=0 valign=top>
<TR><TD><A Href="../index.html"><Img Src="logo1.jpg" Width="592" Height="30" border=0></A></td></TR>
<TR><TD><Img Src="logo3_01.jpg" Width="102" Height="26" border=0><Img Src="logo3_02.jpg" Width="99" Height="26" border=0><Img Src="logo3_03.jpg" Width="99" Height="26" border=0><Img Src="logo3_04.jpg" Width="100" Height="26" border=0><Img Src="logo3_05.jpg" Width="91" Height="26" border=0><Img Src="logo3_06.jpg" Width="101" Height="26" border=0></TD></TR>
<TR><TD Width="592" Height="401"><Img Src="mame2_01.jpg" Width="592" Height="401"></TD></TR>
<TR><TD WIDTH=592 valign=top bgcolor=#ffffff>
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top >
<!-- 1 -->
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A valign=top></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887 valign=top><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A valign=top></Td></Tr>
<Tr><Td colspan=2 valign=top><br></Td></Tr>
</table>
<!-- 2 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 3 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 4 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</table>
<!-- 5 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</Table>
<!-- 6 -->
<Table width=560 Border=1 Align=center CellSpacing=0 CellPadding=5 valign=top>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td Height="18" colspan=3 bgcolor=#DEB887><Font Color="#A52A2A"><b>【質問】</b> </Td></Tr>
<Tr><Td Height="2" colspan=3 bgcolor=#A52A2A></Td></Tr>
<Tr><Td colspan=2><br></Td></Tr>
</Table>
</td></tr>
</table>
</BODY>
</HTML>
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
中に<table></table>が使えるア...
-
テーブルの行を折りたたみたい...
-
tableコーディング 幅ピッタリ...
-
tableにul,または,olを入れられ...
-
テーブルの行の高さを指定する...
-
firefoxでフラットなボーダーを...
-
テーブルのヘッダとボディの幅...
-
テーブルタグをcssでデザインし...
-
テーブルの任意の列を非表示に...
-
トーナメント表の製作
-
テーブル結合 縦横両方するには?
-
テーブルタグの中にdivを含めて...
-
html5のテーブル内でdivのタブ...
-
ウィンドウのサイズを変えても...
-
<th>タグを使っても太字にしな...
-
htmlのボタンを左寄席にしたい
-
TABLEのセルの中の文字を行単位...
-
テーブル内のセル間にスペース...
-
テーブルでスクロールを同期したい
-
テーブルとテーブルの間隔について
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
テーブルの行を折りたたみたい...
-
テーブルの任意の列を非表示に...
-
テーブルのセルに画像をピッタ...
-
TRタグの余白をcssで設定するには
-
中に<table></table>が使えるア...
-
cssで、表示されるテキストによ...
-
テーブルのヘッダとボディの幅...
-
tableにul,または,olを入れられ...
-
ホームページ 表の上の余白を...
-
文字列が入っているtdを削除せ...
-
tableの要素(tr、td)に一...
-
テーブルの表示がずれます
-
テーブルタグのセルの幅の一部...
-
EXCELからhtmlへの変換で罫線が...
-
逆L字の表(table)組み
-
値が0なら非表示にしたい
-
CSSだけで<table>の<td>や<tr>...
-
テーブルの外側の線を消す
-
HTMLで文とテーブルの間が空く。
-
表(テーブル)内の文字サイズ...
おすすめ情報