javascript - Footer is obscuring content in simple 1 column sandwiched css layout -


I am trying to get a simple mechanic to work with CSS and I'm walking in the walls I am

The general layout is that I have a single column layout with headers and footers, I want the headers and footers to remain "fixed" above and below the viewport and I want the center section Adjust the remaining part to fill it with a vertical scroll bar, if there is too much content

I think I am very close, but the point is that the bottom of the page behind the central div footerIs spread out. I am guessing this problem that I have mentioned the height of the central divisor is 100% ... I think it is boil to know about decreasing the height of the fixed footer and keeping central divisions accountable. . Can it be done entirely with CSS move or do I have to use javascript for the screen size query and calculate the offset?

I have tried to add padding and margins to the lower part of the central device. It was not working and even if it was, the best part is that all the material should be visible, but the scroll bar will still roam behind the footer, which is not so clear any help Will be appreciated. Thanks!

HTML:

  & lt; Div class = "container" & gt; & Lt; Div class = "header" & gt; Header & lt; / Div & gt; & Lt; Div class = "content" & gt; & Lt; H2 & gt; Layout & lt; / H2 & gt; Too many lessons & lt; / Div & gt; & Lt; Div class = "footer" & gt; & Lt; P & gt; Footer & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

CSS:

  html, body {height: 100%; Overflow: hidden;}. Container {width: 70%; Background color: #fff; Height: 100%; Status: Relative; Hidden flurry; } .header {background-color: # 6F7D94; Height: 60px; } .content {status: relative; Padding: 10px 10px; Overflow-y: scroll; Overflow-X: Hidden; Height: 100%; Margin-down: 60px; } .footer {status: complete; Bottom: 0; Height: 60px; Width: 100%; Padding: 0; Background-color: # 6F7D94; }  

I

you status: absolute; Also on your .content :

  .content {status: complete; Top: 60px; / * Height of title * / left: 0; Bottom: 60px; / * Footer height * / padding: 10px 10px; Overflow-y: scroll; Overflow-X: Hidden; }  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -