I have two divs contained in a wrapper, which size is relative to the height of the body. One of the divs has a fixed height, the other one is supposed to fill up the wrapper div and let the overflown content scroll (only the inner div).
Fiddle: http://jsfiddle.net/HvC7K/
Usually I calculate the height of “#contactlist” via jQuery, but this time I need the page to be responsive. When I resize the browser window “#contactlist” is stuck at its defined height.
Do I have to recalculate the height everytime the body size changes or is there a way to get it done in CSS?
Thank you!
I’m not positive, but I think you want to use some absolute positioning.
JSFiddle Demo
You could also set
overflow: auto;and the scrollbars won’t show unless necessary.