アプリ版:「スタンプのみでお礼する」機能のリリースについて

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件)

<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>

補足日時:2007/12/01 11:13
    • good
    • 0
この回答へのお礼

ありがとうございます。1度トライしてみます。

お礼日時:2007/12/01 10:11

<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>

補足日時:2007/12/01 11:04
    • good
    • 0
この回答へのお礼

ありがとうございます。1度トライしてみます。

お礼日時:2007/12/01 10:11

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>

補足日時:2007/12/01 10:41
    • good
    • 0
この回答へのお礼

ありがとうございます。1度トライしてみます。

お礼日時:2007/12/01 10:11

不要な全角スペースを全て削除してください。

    • good
    • 0
この回答へのお礼

おーーー、消えました(^.^)
ありがとうございます、助かりました。余計なスペースは
要注意ですね。

お礼日時:2007/12/01 16:44

valign="top"は<table>につけるものではなく、


中身を上寄せしたい<td>につけるものです。
    • good
    • 0
この回答へのお礼

そんなところから違かったとは(^^ゞ
ありがとうございます、調整しなおします。
また教えてください。

お礼日時:2007/12/01 16:43

初めのころは、tableの中に更にtableを作っていたのですが


今は、borderを使用して罫線を引いているので 記憶では

><TD><Table>
たしか <TD><Table> のように改行無しで対応した記憶です

改行の取り方によりスペースが出来てしまう タグ も有りますのでチェックしてね
    • good
    • 0
この回答へのお礼

なるほど、試してみます。ありがとうございます。

お礼日時:2007/12/01 16:42

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!