09-08-2011, 03:11
Witam. Nie wiem dlaczego div container nie chce ustawić wysokość na minimalną 100% tak aby div footer był zawsze na dole strony.Proszę o wskazówki. Posiadam taką konstrukcje
html:
css:
html:
Kod:
<body>
<div id="preload"></div>
<div id="container">
<div id="header">
<div id="banner"></div>
<div class="menu"></div>
</div>
<div id="body">
<div id="blok_lewy"></div>
<div id="blok_prawy"></div>
</div>
<div id="footer"></div>
</div>
</body>
Kod:
#preload{
position:absolute;
left:-9999px;
top:-9999px;
}
body {
background-color:#FF3;
margin:0;
padding:0;
background-position:center top;
font-family: Verdana, Arial, Tahoma, Helvetica, sans-serif;
height:100%;
}
#container {
background-color:#0F0;
width:1024px;
min-height:100%;
position:relative;
margin:auto;
}
#header {
width:1024px;
height:243px;
padding-top:0px;
}
#body {
padding:10px;
padding-bottom:60px; /* Wysokość stopki */
width: 1024px;
height:100%;
overflow:hidden;
}
#blok_lewy{
width:505px;
display:inline;
float:left;
height:100%;
}
#blok_prawy{
width:505px;
display:inline;
float:right;
height:100%;
}
#body p{
color:#d3d2d0;
font-family:Georgia,Verdana,Tahoma,Arial;
font-size:14px;
margin-left:10px;
margin-right:10px;
text-align:left;
}
#footer {
position:absolute;
bottom:0;
width:100%;
height:60px; /* Wysokość stopki */
background:#6cf;
}
#banner{
background:url(../images/banner.png) no-repeat;
float:left;
width:620px;
height:192px;
margin-left:60px;
margin-top:35px;
}