Reputation: 1103
I have a page with two iframe contents which are split horizontally. The left one is a tree view type and its size is initially zero. The right one is shown always. When the size of the content in the right side iframe increases, it creates a scrollbar. The vertical scrollbar is not shown for the iframe, but the browser scrollbar adjusts for the vertical scrolling.
Can the same be done with the horizontal scrollbar? I have the iframes as scrolling=auto; frameborder=0;height=100% etc. Many of the issues i checked are saying like hiding the scrollbar or aligning problem. i cant seem to find something like this. Please advice.
Thanks.
UPDATE
in this link my main content has scroll bar also browser has scroll bar. i just want to use browser's scroll bar not iframe.
Upvotes: 1
Views: 4715
Reputation: 88
What you need to do is to set the overflow of the inner element to hidden. This is possible using divs and other elements.
Unfortunately, this is not possible inside an iframe. The browser doesn't allow access to inner elements, because this could be a major security flaw, allowing you to inject your code into any page anywhere.
See this fiddle and look the message being logged in the console (better viewed in Firebug in Firefox).
What you can do, however, is to calculate the document height inside the iframe, and set the iframe height accordingly, avoiding the inner scroll bar. See this question.
Cheers, Apoc.
Upvotes: 1