# [SOLVED] Nested iframe scrolling issue



## danabaillie (May 6, 2014)

We have a server that presents courses to learners. The learning environment is configured using iframes. It was using framesets and worked perfectly.

We are now moving to HTML5 where framesets are no longer valid. So, we have replaced the framesets with iframes. The code below shows the structure of the iframes.

There are several nested iframes. There is additional div tags that are used to place the iframes into the structure in the image below, but they detract from the iframe code.

We are having problems with scrolling the tree iframe. If we set scrolling to no in the id="st" iframe, the id="tree" iframe does not scroll. 

If we set scrolling to auto in the id="st" iframe, along with scrolling set to yes in the id="tree" iframe, then there is a scrollbar on both iframes. So, there are two scrollbars where we only need one.

The image below shows what the learning environment looks like with the setting listed in the paragraph above. We need a scroll bar only on the tree iframe. The header should not scroll.

Is there something that we are doing that is messing up what should be fairly simple?

Sorry, publishing the question messes up the formatting of the nested iframes in the code below.

Thank you for any help.






</iframe>
<iframe id="sb" src="/htm/statusbar.htm" scrolling="no"></iframe>


----------



## Fjandr (Sep 26, 2012)

*Re: Nested iframe scrolling issue*

From the sound of it, the "tree" object is a child of the "st" object, so is inheriting the attributes of "st". Try setting scrolling to off on "st" and setting 'scrolling="yes" !important' to "tree". That should force an override of every inherited scrolling attribute for "tree".

It actually would be much easier to troubleshoot if you could include the entire code for one page of the site, though I understand if that's not acceptable (proprietary code, etc.).


----------



## danabaillie (May 6, 2014)

*Re: Nested iframe scrolling issue*

Thanks for the suggestion, Fjandr

I had hoped that your suggestion would be the winner. It would have saved me a lot of time. Unfortunately, that didn't fix it. As it turns out, I placed this same question on another forum and the comment there was that nested iframes are a hassle at best.

It was suggested that I redesign the learning environment so that it does not have nested iframes. That's what I'm starting right now. 

It's going to be ugly, because the server initially loads a page with three iframes and each iframe either has the server load a specific html file into it, or has the server decide which file is loaded into the calling iframe. The file being loaded may contain a couple additional iframes, which are nested. Once it's complete, though, it'll be a nicer and less complicated setup.

Thanks for your suggestion.

Dana

http://www.techsupportforum.com/forums/members/fjandr-977964.html


----------



## Fjandr (Sep 26, 2012)

I would actually second the suggestion to redesign the site to eliminate the use of iframes. Without seeing the entire page code, my CSS suggestion was little more than a shot in the dark. There are a number of factors that could be in play, only one of which would be fixed by my comment above.

If you're interested in doing the work to learn a programming language, it's a relatively simple thing to do using PHP or another scripting language.


----------

