homepage Welcome to WebmasterWorld Guest from 107.20.25.215
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
iframe Horizontal Scroll Bar Hassle
Old problem, any new ideas?
lateatnight




msg:585573
 11:29 pm on Jun 27, 2006 (gmt 0)

I am having some iframe hassles that are driving me to drink. I know this is a problem which has been discussed here before, but here I go again:

I only want/need vertical scrollbars to appear on my iframes. I have ensured that the width of the content of the iframe (ie: the page being displayed in the iframe) is no wider than the width of the iframe itself.

If I set scrolling="auto", then it displays fine in Firefox and Netscape, but in IE I get horizontal scrolling bars, despite the fact that the content is definitely not too wide for the iframe.

If I set scrolling="yes", then it displays properly in IE and Netscape, but in Firefox I get a "blank" horizontal scroll bar, which looks terrible.

Now, what really bugs me is that I have used iframes before and I've never had this same problem... I've re-examined my code a zillion times and still can't figure out why these particular iframes are having the horizontal scroll bar problem.

My code that DOES work:

<td width="465" height="400" rowspan="2" align="left" valign="top">
<iframe name="frame" src=welcome.htm frameborder=0 scrolling="auto" height=390 width=460></iframe>

My code that DOES NOT work:

<td width="560" height="380" align="left" valign="top">
<iframe name="frame" src=main.htm frameborder=0 scrolling="auto" height=380 width=550></iframe>

I searched on the forums and found this fix:

style="overflow-x: hidden; overflow-y: scroll;"

But I tried it and it didn't work.

Any ideas?

 

tedster




msg:585574
 8:35 pm on Jun 28, 2006 (gmt 0)

Try working with the html document that appears inside the iframe -- set body { width:95% } in your css for the iframed page.

Quadrille




msg:585575
 8:43 pm on Jun 28, 2006 (gmt 0)

And be sure to do all your testing on a small screen; many folk still have them, and many 23" webmasters never see the mess their pages get twisted into! ;)

lateatnight




msg:585576
 2:08 am on Jun 30, 2006 (gmt 0)

Okay, I figured it out! For some reason, I had forgot to set up margins on the page within the iframe, so it was messing things up.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved