Jump to content

Scroll bars and iframes


Deleriad
 Share

Recommended Posts

My problem is with iframes and scrollbars. I've had a look around and see no answer.At it's simplest, I have an iframe (called databyte) in a page and links in other parts of that page that load files into the iframe. The iframe is set to a fixed size (300width, 200 height and has scrolling=auto set).Now when I load a simple text-only HTML page into the frame that doesn't fit then it *ought* to give me a vertical scroll bar and that does indeed happen in Firefox. In IE6/7 though it always puts in a horizontal scroll bar as well and that is really, really annoying.Is this just a problem with IE and is there a fix or is there something really dumb that I'm doing wrong? I can give a fully detailed example if needs be.Thanks for any helpBruce

Link to comment
Share on other sites

Just put the txt as txt in a html file and it will work then.

Link to comment
Share on other sites

Oh and welcome to the forum! :)

Link to comment
Share on other sites

Oh and welcome to the forum!  :)

Thanks for that. I do have just a simple text file and IE7 insists on a horizontal scroll bar as well. What it seems to be doing is adding in a vertical bar then thinking "box is not wide enough now so I'll add in a horizontal bar to make up the difference."I've put the example online at iframe in IE7 vs Firefox to show what I mean if that helps. Even the simplest text file still generates horizonal bars in IE7.BTW I tried the overflow idea but it didn't work just now. (Still seems to work in IE7 for graphics but the text does not seem to be registering as an overflow).Bruce
Link to comment
Share on other sites

Yeah I know what you mean fella.If you make a html file for just the text it will work then, as it does as it should when the file is a html file not a txt file.Other than that I dont know any other way to fix the problem though sorry.Yet another reason why IE sucks. :)

Link to comment
Share on other sites

  • 2 weeks later...
Yeah I know what you mean fella.If you make a html file for just the text it will work then, as it does as it should when the file is a html file not a txt file.Other than that I dont know any other way to fix the problem though sorry.Yet another reason why IE sucks.  :)

Well, I fudged it in the end. Set the iframe to scroll:no and then ensured that any files I loaded into it were set to a width and height (by setting a style that set the width and height of the body) that would fit inside the frame. That way the scrolling worked properly.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...