ページの下部にフッター付きの3行のdivレイアウトがありますが、コンテンツdivをヘッダーからフッターまで常にフルサイズにする必要があります。コンテンツdiv内には、iframeもあります。このiframeは、常にコンテンツの高さ100%、ヘッダーとフッターの間のスペースの高さ100%にする必要があります。これは私の(サンプル)ページです:
<body>
<div id="container">
<div id="header">
logo
</div>
<div id="content">
<h2 id="appname"><img alt="App" src="/images/b_nextpage.png"> Home</h2>
<iframe class="appcont" src="" width="100%" height="100%" name="youriframe" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="yes" noresize></iframe>
</div>
<div id="footer">
<button name="menu" type="button" id="menuopen"><img alt="App" src="/images/s_process.png"> <b>Menu</b>
</button>
</div>
</div>
</body>
これは私のCSSです:
html, body {
font-family: sans-serif;
padding: 0em;
margin: 0em;
color: #444;
background: #fff;
text-align: center;
height: 100%; /* Important */
width: 100%;
}
#container {
margin: 0px auto;
text-align: center;
height: 100%;
}
よろしくお願いします