Reputation: 964
I have a div with height in %
and overflow: hidden;
. Inside a div with overflow: auto
doesn't show scroll when content is big.
Is it posible to do that i want?
Live: http://indorio.ru/inside-box.html (#overlay-box fluid with height of %)
Upvotes: 8
Views: 11242
Reputation: 2787
Overflow requires a height to be specified, otherwise the element will wrap its contents. Depending on your situation you could specify the height as 100%:
#outer {
height: 400px;
padding: 10px;
background: red;
}
#inner {
height: 75%;
padding: 10px;
background: blue;
}
#scroll {
overflow: auto;
height: 100%;
background: green;
}
#content {
height:400px;
}
Upvotes: 13