Hi,
I decided to improve my web layout skills to Div-based layouts instead of the table based layouts I am used to. While I am a program (who doesn't like layouts, I like functionality) I decided it was time for me to put some energy in changing my layout skills to modern ways.
I found an example on the Internet that helped me very well but the only thing I can't get to work is that when people have a lower resolution let’s say 800x600, then it will be impossible for them to watch the website because the content div is to small. That’s why I would like to set a minimum height for the content div. In case of a resolution of 800x600 there should be a scroll bar that scrolls the whole page up and down.
And min-height: 700px; doesn't do the trick for me in IE...As I've read in the CSS documentation it isn't even supported within IE
Here is my code, almost the same as from this website but the problem is the same.
I decided to improve my web layout skills to Div-based layouts instead of the table based layouts I am used to. While I am a program (who doesn't like layouts, I like functionality) I decided it was time for me to put some energy in changing my layout skills to modern ways.
I found an example on the Internet that helped me very well but the only thing I can't get to work is that when people have a lower resolution let’s say 800x600, then it will be impossible for them to watch the website because the content div is to small. That’s why I would like to set a minimum height for the content div. In case of a resolution of 800x600 there should be a scroll bar that scrolls the whole page up and down.
And min-height: 700px; doesn't do the trick for me in IE...As I've read in the CSS documentation it isn't even supported within IE
Here is my code, almost the same as from this website but the problem is the same.
Code:
html
{
height: 100%;
_max-height: 100%;
min-height: 1000px;
padding: 0;
margin: 0;
border: 0; /* hide overflow:hidden from IE5/Mac */ /* \*/
overflow: hidden; /* */
}
body
{
width: 750px;
margin: 0 auto;
margin-top: 0px;
background: url(site_pic/background.jpg);
background-attachment: fixed;
background-repeat: repeat;
height: 100%;
overflow: auto;
_max-height:100%;
min-height: 1000px;
}
#header
{
display: block;
position: absolute;
width: 750px;
height: 240px;
background-color: #000000;
background: url(site_pic/header.jpg) #000000;
background-repeat: no-repeat;
background-position: center center;
width: 730;
}
#menu
{
position:absolute;
top:240px;
width: 750px;
height: 30px;
background-color: #000000;
padding-left: 0px;
word-spacing: 25px;
text-align: center;
padding-top: 7px;
}
#content
{
position: absolute; /* needed for footer positioning*/
/*margin:0 auto; */ /* center, not in IE5 */
_height:auto !important; /* real browsers */
_height:100%; /* IE6: treaded as min-height*/
min-height:100%; /* real browsers */
_display: block;
_padding-bottom: 320px;
width: 750px;
background-color: #000000;
margin: 0 auto;
text-align: center;
bottom:50px;
top:270px;
_z-index:3;
overflow:auto;
}
#footer
{
overflow: hidden;
position: absolute;
margin-top: 0px;
width: 750px;
height: 50px;
background-color: #000000;
bottom: 0;
_z-index: 5;
display: block;
}
#menu a
{
font-family: sans-serif;
font-weight: lighter;
font-variant: normal;
color: #FFFFFF;
text-decoration: none;
}
#menu a:hover
{
text-decoration: underline;
}
#contentarea
{
width: 730px;
background-color: #FFFFFF;
height: 100%;
}
Code:
<div id="header">
<div id="headerpic"></div>
</div>
<div id="menu">
<a href="javascript:selectMenu('home.html');">Home</a>
<a href="javascript:selectMenu('agenda.html');">Agenda</a>
<a href="javascript:selectMenu('nieuws.html');">Nieuws</a>
<a href="javascript:selectMenu('band.html');">Band</a>
<a href="javascript:selectMenu('historie.html');">Historie</a>
<a href="javascript:selectMenu('home.html');">Media</a>
<a href="">Gastenboek</a>
<a href="javascript:selectMenu('contact.html');">Contact</a>
<a href="javascript:selectMenu('link.html');">Link</a>
</div>
<div id="content">
<iframe id="contentarea"home.html">
</iframe>
</div>
<div id="footer">
</div>