I have two HtmlPanel components containing subcomponents that change heights based on how they are expanded (trees). When these trees become too big to be contained in the panel, I want the panel to get scrollbars. I get this to work when I set the panel height to a static pixel value, but when I change it to a percentage value this stops working. Once the tree is expanded beyond the size of the panel, the panel just expands its height, even if this makes it have a greater height than it is defined to have in the css file.
For the sake of clarity, the components have the following structure:
HtmlPanelGrid (height: 90% of page height)
--HtmlPanel 1 (height: 99% of HtmlPanelGrid height)
----HtmlPanel 2.1 (height: 35% of HtmlPanel 1 height)
----HtmlPanel 2.2 (height: 60% of HtmlPanel 1 height)
I'm not really a css expert, but I don't see any obvious reasons why it shouldn't work. Does anyone know a good way to make panels get scrollbars even when set to percentage height?