Iframe

G

GTi

I have several iframes in my main document.
The context of the iframes is variable in width and height.
But I dont want the scrollbars to show in the iframe. The size
of the iframe contents is always 100%. So if the contents of the main
document exceeds then the srollbars is shown in main document.
 
J

Joshie Surber

But I dont want the scrollbars to show in the iframe

Is your question how to do this?
iframeobject.style.height =
iframeobject.getComputedStyle(document.body).height
and just call this function any time the iframe reloads.
 
G

GTi

Joshie said:
Is your question how to do this?
iframeobject.style.height =
iframeobject.getComputedStyle(document.body).height
and just call this function any time the iframe reloads.

so if I have say 2 iframes side by side. Each iframe is 600px in width.
The total screen/document width is 1024px. Is the scroll bar visible on
the iframes windows or in the main document window (that is what I
want).
 
J

Joshie Surber

Is the scroll bar visible on the iframes windows or in the main document window (that is what I want).

This will mostly depend on the browser, but if the iframe is large
enough to hold everything, the scrollbar shouldn't display. You may
want to make sure using the CSS overflow property (set to visible on
the iframe and clip on the iframe's body)
 
G

GTi

Joshie said:
This will mostly depend on the browser, but if the iframe is large
enough to hold everything, the scrollbar shouldn't display. You may
want to make sure using the CSS overflow property (set to visible on
the iframe and clip on the iframe's body)

I you look at Googles portal (http://www.google.com/ig : You need a
google account to logon in. If you need one send me a note and I will
invite you). They use iframes to group it (I think). So resizing the
main document just put the scrollbars at the main document, not in the
iframes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top