Page 1 of 1

iFrame problems.

Posted: Tue Jul 31, 2018 9:47 am
by mwalter
I'm having an issue with an iFrame I'm trying to use. I'm using an Iframe to show an HTML Progress Bar. This is working fine.

The problem I'm having is even though I set the iFrame's Overflow properties to hidden, it's still showing a vertical scroll bar.
The HTML page has the CSS set to hide the overflow controls on both the progress bar and the div in which the progress bar resides.

Any ideas?

Re: iFrame problems.

Posted: Wed Aug 08, 2018 3:42 am
by TaskForce_Kerim
It's not the iframe that's showing the vertical scrollbar but the website inside it. For the website inside the iframe, the iframe is like a small browser window.

If you have source code access to the iframe's content, try adding the following CSS rule:

Code: Select all

body {
  overflow: hidden;
}
If you don't have access to the source code. Things become a bit hacky. You can try adding the scrolling attribute to the iframe tag, like so:

Code: Select all

<iframe scrolling="no" src="....>
but this is no longer in the HTML5 specs and as such is deprecated. It might not work in all browsers, it could break in the future, and so on.