tab pages and document size

tab pages and document size

Hi all,

I'm writing a webpage which uses the tab control. One of the tab pages is an index, which is much longer than the other pages in the control. When this tab is selected, the document is resized to accommodate it, but when I switch to another tab the document stays at the same size. I want to reduce the document size to fit the size of the tab which is selected: some of my tabs are quite small and I don't like to have scroll bars which scroll over acres of blank space.

To a lesser extent, this is also a problem for resizeable textareas: they grow the document as they are expanded, but when they're reduced in size the document stays the same size, resulting in needless scrollbars.

Have other people come across these issues? Can someone suggest a neat solution to them?

Thanks,
John