I have a DIV that has a percentage for height. I’ve tried to use overflow:auto on it but it seems to disregard this after a certain number of paragraphs are placed within the DIV. I’m assuming this means that using overflow:auto in conjunction with percentage dimensions is simply impossible.
Any input on this is appreciated. Can this be done?
I’m assuming you want scrollbars to show when the content overflows the div?
Can you post the code?
[edit]: I just did some testing quick…it looks like the div height and width needs to be large enough to accommodate the scrollbars. 50x50 px will accommodate them, but I wouldn’t go to much smaller than that. The scrollbars themselves take up 20px or so.
I would but I have too much and I’d hate for others to do all the leg work, ya know? I went to that page you linked to, changed a div to use % in height, and realized that it’s possible. So I just need to go back and re-adjust things.
This may have nothing to do with your problem but for a percentage height to work the parent of that element must have a height set. It cannot be height:auto or have it’s height dictated by its content otherwise the child’s height reverts to auto.
If the parent has a percentage height then it’s parent must also have a height set and so on all the way up the tree. The height must always be reconciled to a known computed height otherwise it becomes height:auto. min-height is of no use for this purpose.