PDA

View Full Version : How to adjust "Tabbed Document Viewer"'s height ? (height % doesn't work)



ren
03-26-2007, 11:19 PM
Tabbed Document Viewer

http://www.dynamicdrive.com/dynamicindex3/tabdocviewer.htm

I am using the tabbed document viewer script, and it works like a charm. But how do I resize the tab window's height to automatically fit the height? The width % works, but the height % doesn't.

Thank you

- Ren

ddadmin
03-27-2007, 12:02 AM
Are you sure it doesn't work? The code in red is where you adjust the height value inside the script:


<iframe id="tabiframe" src="http://www.google.com" width="98&#37;" height="350px"></iframe>

ren
03-27-2007, 01:33 AM
Are you sure it doesn't work? The code in red is where you adjust the height value inside the script:


<iframe id="tabiframe" src="http://www.google.com" width="98&#37;" height="350px"></iframe>
yes ddadmin, I was aware of the height property. But by changing it to 90&#37; or 100% gives me about 200 px of height. There might be some hidden variable somewhere else that already set the default height for the tabbed window.

I was hoping to set the % so that it works with all kinds of screen resolution. Thank you

- Ren

thetestingsite
03-27-2007, 01:36 AM
The only thing that controls the height of the iframe is what ddadmin posted. There is nothing in the css or javascript that controls this. Anyways, Hope this helps.

ddadmin
03-27-2007, 01:49 AM
yes ddadmin, I was aware of the height property. But by changing it to 90% or 100% gives me about 200 px of height. There might be some hidden variable somewhere else that already set the default height for the tabbed window.

I was hoping to set the % so that it works with all kinds of screen resolution. Thank you

- Ren

Hmm there aren't any other places in the script that's controlling the iframe height- just the height attribute within the iframe tag. I think you need to take into consideration how CSS percentage values behave when it comes to the "height" property- it's relative to the browser window's height.

ren
03-27-2007, 02:31 AM
OK guys. I am gonna test out in different environments and see how it turns out. Thank you for your replys.