iFRAME Scrollbars
- Started
- Last post
- 8 Responses
- atomica
I've got a slight compatibility issue with iframes, is there anyway to remove the scroll bars to an iframe in MSIE for the Mac, i've accomplished it fine with the body style for the hiding of the x/y scroll bars but it doesn't work in IE Mac or even in NS 6/7 on PC... any work around on this?
- matt250
scrolling=no
- gabe0
i was having the same problems.
it's actually a bug in Mac IE. even with the scrolling="no" attribute, it still displays the scrollbars.
travis from podlob sent me these two fixes (view source):
- jandiro0
try scroll="auto"
or use css
- gabe0
scroll="auto" will also add a scrollbar. i think IE for Mac adds a 15 pixel border to the right side of the page.
http://developer.apple.com/inter…
if you don't want to use JS, i think you can surround your content with overflow: hidden; thus clipping off any content that appears outside of the boundires of the iframe.
all of this code needs to be within the pages displayed in the iframe, not in the page that contains the iframe src itself.
- atomica0
Thanks so much, I'll give thr javascript approach a try on my lunch break this afternoon.... if I have anymore problems i'll be sure to check back...
- matt250
I think the trick is you have to allow for 25-50 extra pixels
meaning if your area is say 200 pixels high, don't bring the text write down to 200.
Add an extra 50 pixels or so to the actual height and width to be safe - if you have the space to play with
you can see an example of this on my site http://www.doubledown47.com
the news window is an iframe with no scroller.
- gabe0
the error doesn't occur until you try to load a new page into the iframe.
i.e. if you are loading pages into an iframe, the first one will look fine, the second one display ok, then the third (2nd new page) and all pages after will get the scrollbars...
weird bug!
- gelund0
If you are displaying images only in your iframe, you can work around having to pad with extra pixels by setting the child page background images = (your image). This will give you a borderless fit inside the iframe without showing scrollbars. I used this method in the left iframe here: http://www.oz.net/~gelund/