ページを水平方向に半分に分割しようとしています。HTML/CSSだけで実現したいのですが、JSは使いたくないです。私は何を間違っていますか?
ありがとう
CSS
#container {
min-height:100%;
}
#top_div {
height:50%;
width:100%;
background-color:#009900;
margin:auto;
text-align:center;
}
#bottom_div {
height:50%;
width:100%;
background-color:#990000;
margin:auto;
text-align:center;
color:#FFFFFF;
}
HTML
<div id="container">
<div id="top_div">top</div>
<div id="bottom_div">bottom</div>
</div>