I am trying to create a layout structured like this:
- north pane
- center pane
- a header div
- a notebook-like tab panel
- with at least one tab
- a footer div
header div and footer div has to be always visible, the tab should take all remaining space and should have a vertical scroll bar if needed.
Here is what I did: https://jsfiddle.net/mguijarr/y57v3nkf/
I set overflow:hidden
on the center pane, I tried to set
height: 100%
on tab panel for it to grow as much as it can,
but it's eating the space below (ie. the footer div is not
shown).
What can I do to fix the layout ?
The footer is there. The problem is just that you can't set the
div#tabs
with height: 100%, because the outer div hasoverflow:hidden
It will have the same height as its container, but as the footer is at the same level as the
div#tabs
, it will be hidden, because thediv.ui-layout-center
has theoverflow:hidden
.First solution: change the height of
div#tabs
to a lower percentage:https://jsfiddle.net/y57v3nkf/1/
Second solution, change the overflow option of the outer div to automatic: https://jsfiddle.net/y57v3nkf/2/
Third Solution (Jquery Brute force): Set the outer div to 100% height, and:
https://jsfiddle.net/y57v3nkf/3/
Porblems with this solution:
TIP: Go percentual: These layouts get really tricky when you have fixed size divs along with percentual divs. To go fully responsive, you'll have to redo all the layout thinking in percentages, example: