私はこのHTMLを持っています:
<body>
<div id="logo">
<table id="width100" cellpadding="0" cellspacing="0" >
<tr>
<td width="33.33%" align="left"> </td>
<td width="33.34%" align="center"><a href="http://www.rawgameshop.com/"><img src="images/logo_new.png" /></a></td>
<td width="33.33%" align="right"><img src="images/logo_right.png" /></td>
</tr>
<tr bgcolor="#731000" id="width100">
<td height="15" colspan="3" ></td>
</tr>
</table>
</div>
<center>
<div id="container">
<div id="main_body">
asd
</div>
</div>
</center>
そしてこのCSS:
body {
width:100%;
height:100%;
margin:0px;
background-color:#ECECEC;
}
#logo {
width:100%;
height:165px;
background-color:#FFFFFF;
}
#width100 {
width:100%;
}
#container {
background-color:#FFFFFF;
height:100%;
width:900px;
}
#main_body {
width:800px;
background-color:#FFFFFF;
height:100%;
}
私の質問は、なぜ私のmain_body
divがページの中央に伸びないのですか?それは文字と同じくらいの高さです。
HTMLタグを削除すると、<center>
下に伸びますが、画面サイズが100%の場合は、最後までスクロールする必要があります。それ以上ではなく、画面の端に配置したかったのです。