Pergunta

The 4 div's should stack on each other and they shouldn't overlap!

  1. Head should be like the 4.footer width 100%
  2. Menu should stack with 1.Head & 4.Footer.
  3. Content should be centered in the page and on browser re-size the 3.Content should stack with the other div's and not overlap

Here a link to the picture which visulized the problem:
https://docs.google.com/file/d/0B5Ki_dh4A-VJd2VNZ1o5b0RzQmc/edit?usp=sharing

here a link how it should be:
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>

Foi útil?

Solução

Hi please review the code in this link http://jsfiddle.net/9gPMR/99/

It's an option using display:table and table-cell to fit on the window.

Let me know any question or suggestion about this.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top