html - CSS Layout Issue - Div not extending with content -


i new div layouts , working css please forgive me if don't make sense i'm ask.

issue
have page if blank page renders correctly divs filling screen. when tested situation content larger content area content div did not expand in height content. have worked on couple of hours can't seem work. below css sheet looks like. guidance can give appreciated.

ideal fix
header section @ top @ 100px, submenu section under header @ 50px, footer @ bottom of page @ 50px , content section between submenu , footer section. if content doesn't fill page content section fills rest of page footer @ bottom , if content larger page content section pushes footer down screen fill content in. (hope makes sense)

i webpage has following divs in it.

div 1 - container div 2 - header div 3 - submenu div 4 - content div 5 - footer 

css sheet

body, html {     height: 100%;     margin: 0px;     padding: 0px;     background-color: #7eb5d6; }  .container {     width: 700px;     height: 100%;     margin-left: auto;     margin-right: auto;     background-color: white;     position: relative;     overflow: auto; }  .header {     width: 100%;     height: 100px;     background-color: lightpink;     position: relative; }  .submenu {     width: 100%;     height: 50px;     background-color: darkgray;     position: relative; }  .content {     width: 100%;     height: calc(100% - 200px);     background-color: wheat;     position: relative; }  .footer {     width: 100%;     height: 50px;     background-color: black;     position: inherit;     bottom: 0; } 

put content height:auto can auto adjust according content.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -