I have a container and two div inside it:
The container has a fixed 500px height. I don't know head's size, but I want to fill all the container height with body. I tried to set this height value to body:
- 100%: doesn't work, because the body get height of 500px from its parent (container) and overflow.
- auto: body may be empty or only with some short content and in this case the body height will be lower than free container space.
How to fill the container with a fitting body?
This is the fiddle with the example:
#body{ height 100%; }