画面サイズに基づいてページ上で div を移動しようとすると問題が発生します。
ページ (以下のコード) に幅が正しく表示されていますが、ユーザーがページのサイズを変更したときに高さが正しく表示されないようです。
私がやろうとしていることは..
- 上部に表示されるヘッダーがある
- 左側にメニューがあるページ
- ページテキストを表示する右側のページ
- 下部のフッター
私のページは以下のようになります。
index.htm:
<style type="text/css">
body{
margin:0;
padding:0px;
line-height: 1.5em;
padding-bottom:10px; /* Height of the footer */
}
#topsection{
background: #EAEAEA;
height: 90px; /*Height of top section*/
}
</style>
<!-- top -->
<div id="topsection">
<div>
This is the top
</div>
</div>
<!-- Left side -->
<div ID="left" STYLE="width:260px; left:0px; height:90%; float:left;">
<iframe src="test.htm" NAME="menu" width="270px" height="100%" frameborder="0"></iframe>
</div>
<!-- right side -->
<div ID="right" STYLE="height:90%; left:0px; float:left;">
<iframe src="test1.htm" NAME="right" width="100%" height="100%" frameborder="0"></iframe>
</div>
<!-- footer -->
<div ID="foot" STYLE="height:10%; left:0px; top:90%; float:left;">
<iframe src="foot.htm" NAME="footer" width="100%" height="100%" frameborder="0"></iframe>
</div>
test.htm:
<body bgcolor="#808080">
test1.htm:
<body bgcolor="#88888888">
right side text
foot.htm:
<body bgcolor="#9999999">
This is a footer