PDA

View Full Version : unable to get iframe to scroll


bazz
08-07-2003, 06:35 PM
Hi,

I'm using the doctype html 4.0 transitional /en. This can br changed if it is not up to date enough.

I have an ifrmae in the dynamic page that displays perfectly but for the lack of scrolling. I have tried various attempts such as scrolling="auto" & scrolling="yes" also scrollbars="yes" and scrollbars="auto"

The present configuration is this but I cant get the scrollbars to display.

<iframe name="iframetext" height="316px" marginwidth="15px" marginheight="0px" frameborder="0" scrollbars="yes" width="280px" bgcolor="#d2f3da" src="domain name/intro.htm">
</iframe>

Is it possible that the control of the scollbars comes from the external css or is embedding it in the page the best (only) way?

Bazz.

Frank
08-07-2003, 07:38 PM
I have run into this problem before, but it has always been the reverse having an iframe that I didn't want to scroll.

Anyway your problem is that the htm that is being placed inside the iframe is smaller then the iframe and so it has no need to scroll.

Try adding 20 or so <br> tags at the bottom of you htm and see if you can scroll then.

Hope that helps

bazz
08-07-2003, 08:02 PM
Thanks I'll try that but, the only reason I want it to scroll is because some of the text runs to below the bottom of the iframe. :confused: :thumbsup:

OK so I tried this but it hasnt made any difference.

any ideas??

bazz

Frank
08-07-2003, 08:04 PM
Some of the text runs below the iframe, but it doesn't scroll. How much of the text is underneath the iframe?

bazz
08-07-2003, 08:10 PM
About 8 or 10 lines. I tried what you siggested (just in case our last two posts crossed) and it hasnt made any visible difference.

If I revert to using a css text section with overflow set to scroll, this would work, however, is there a css code that will enable me to load several pages to this one text section as I can with iframe? It was for this that i changed to iframe inb the first place, not knowing it is IE only.

Frank
08-07-2003, 08:40 PM
You could used div's and control there visiblity with css and javascript. I wouldn't want to load to much on to one htm though.

I will do a sample of what I mean and post it later today.

Iframes will work with the some of the newer browsers.

You could ask people in the forum to check your site with different browsers so you would know for sure which ones work.

bazz
08-07-2003, 09:27 PM
Thanks Frank.

I am using IE6 so I think it should work in my browser if it works in any?

I'll try a different doc type in case it is causing the problem. I have only one page to reconfigure since it is dynamically generated for the bulk of my site.:cool:

bazz
08-07-2003, 10:06 PM
Yippee!!

I have discovered that I dont need my iframe to scroll because I can let the htm page within it scroll. The css file I have for it, (the htm page within the iframe), had overflow set to hidden becasue I anted the iframe to scroll. When I took it off, the page scrolls as I want and with scrollbars to match the site.

I changed the doc type too though it works with both xhtml 1.0 strict as well as html 4.0 transitional (well on IE6 anyway). 95% of my visitors use IE5 or 6.

Bazz

Frank
08-07-2003, 10:38 PM
Thats great you figure it out.

Incase your interested, I'm including the file I mentioned earlier.

bazz
08-07-2003, 10:47 PM
Thanks Frank, I'll download it shortly when I finish validating my page. I might be some time as none of the doc types seem to validate.

AaronW
08-07-2003, 10:50 PM
Originally posted by bazz
I am using IE6 so I think it should work in my browser if it works in any?

:rolleyes:

http://www.mozilla.org/ :D