I have a header bar(#A) sticked on top and a footer bar(#C) sticked on the bottom of the page. Each one have a fixed height of 30px
and are represented here by the
Maybe you are trying to achieve something like this:
html { height: 100%; min-height: 100%; }
body { height: 100%; min-height: 100%; margin: 0; }
#container {
display: flex;
flex-direction: column;
height: 100%;
}
#A { flex: 0 0 30px; }
#B { flex: 1 1 auto; overflow: auto; }
#C { flex: 0 0 30px; }
http://codepen.io/simoncereska/pen/xZQPXQ