I have four DIVs
wrapper = contains everything height and width should be 100%
header = a header I want to be 50 pixels high and 100% width
mapcontent = a google map I want to be 100% width and 100% height
footer = a footer I want to be 50 pixels high and 100% width locked to the bottom of the screen not matter the screen size
Basically I need header always the same height locked to the top and footer always the same size locked to the bottom and malcontent taking up all space in between.
In the code below the footer does not push the container up so the footer covers the lower map controls. Even if you delete the footer div the lower part of the map_container div is off the bottom of the visible window area.
Any help appreciated :
wrapper = contains everything height and width should be 100%
header = a header I want to be 50 pixels high and 100% width
mapcontent = a google map I want to be 100% width and 100% height
footer = a footer I want to be 50 pixels high and 100% width locked to the bottom of the screen not matter the screen size
Basically I need header always the same height locked to the top and footer always the same size locked to the bottom and malcontent taking up all space in between.
In the code below the footer does not push the container up so the footer covers the lower map controls. Even if you delete the footer div the lower part of the map_container div is off the bottom of the visible window area.
Any help appreciated :
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style>
html, body {height: 100%}
#wrapper
{
width:100%;
height:100%;
min-height:100%;
background-color: #CFF; /* LIGHT BLUE */
}
#header
{
height: 50px;
width:100%;
background-color: #F0F; /* PINK */
}
#map_container
{
height: 100%;
min-height:100%;
width:100%;
overflow-y: hidden;
background-color: #06F; /*DARK BLUE */
}
#footer
{
position: fixed;
z-index: 10;
height: 50px;
width: 100%;
background-color: #0F0; /* GREEN */
bottom: 0px;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header"></div>
<div id="map_container">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d8120655.7476568185!2d34.89248265!3d-6.372825300000001!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x184b51314869a111%3A0x885a17314bc1c430!2sTanzania!5e0!3m2!1sen!2suk!4v1396366970642" width="100%" height="100%" frameborder="0" style="border:0"></iframe>
</div>
<div id="footer"> </div>
</div> <!-- CLOSE WRAPPER DIV -->
</body>
</html>