We need to ensure that the 4 divs stack on top of each other without overlapping!
- The header should have the same width as the footer, 100%
- The menu should stack with the header and footer
- The content should be centered on the page and stack with the other divs when the browser is resized, avoiding overlap
Here is a link to a picture illustrating the problem:
https://docs.google.com/file/d/0B5Ki_dh4A-VJd2VNZ1o5b0RzQmc/edit?usp=sharing
And here is a link showing how it should look:
https://docs.google.com/file/d/0B5Ki_dh4A-VJWllueWtwX0JSTFE/edit?usp=sharing
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#headr{
height: 100px;
width: 100%;
background-color: #33ff33;
top: 0;
left: 0;
right: 0;
position: fixed;
border: 1px #000 solid;
}
#menu{
height: 100%;
width: 150px;
background-color: #ccff00;
left: 0;
top: 0;
position: fixed;
border: 1px #000 solid;
}
#content{
background: rgba(225, 225, 225, 0.5);
border: 1px #000 solid;
height: 600px;
width: 800px;
margin-left: -400px;
margin-top: -300px;
left: 50%;
top: 50%;
position: fixed;
}
#footer{
height: 35px;
width: 100%;
background-color: #ff3300;
bottom: 0;
left: 0;
right: 0;
position: fixed;
border: 1px #000 solid;
}
</style>
</head>
<body>
<div id="headr"><p style="text-align: center;"> 1. Head</p></div>
<div id="menu"><p style="text-align: center;"> 2. Menu</p></div>
<div id="content"><p style="text-align: center;"> 3. Content</p></div>
<div id="footer"><p style="text-align: center;"> 4. Footer</p></div>
</body>