I'm having trouble getting iFrames to work properly on iOS. Everything works on desktop and Android, however on iOS (Safari or Chrome iOS), the contents inside the iFrames are not scrollable. Not only that, but I was struggling with changing the size of the iFrame with CSS. I originally was just going to create my own navbar without the use of iFrames, but I decided to take the challenge and figure this out.
After a couple of weeks, I finally found a fix for this. I tried a ton of different things, some worked but made the scrolling super buggy. This is the best solution I have found. The biggest problem with this so far is that you get double scrollbars on your page. However, scrolling works very fluidly.
On your navbar page, insert height=200 and scrolling=no on each iframe tag.
<iframesrc=""height=200scrolling=no></iframe>
Then, on the iFrame page itself (the src of the iframe) insert this in the Header:
<style>
html, body {height:100%;overflow:hidden}
body {overflow:auto;-webkit-overflow-scrolling:touch}</style>
Hope this helps someone else in the future. Cheers.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
kpcollier
I'm having trouble getting iFrames to work properly on iOS. Everything works on desktop and Android, however on iOS (Safari or Chrome iOS), the contents inside the iFrames are not scrollable. Not only that, but I was struggling with changing the size of the iFrame with CSS. I originally was just going to create my own navbar without the use of iFrames, but I decided to take the challenge and figure this out.
After a couple of weeks, I finally found a fix for this. I tried a ton of different things, some worked but made the scrolling super buggy. This is the best solution I have found. The biggest problem with this so far is that you get double scrollbars on your page. However, scrolling works very fluidly.
On your navbar page, insert height=200 and scrolling=no on each iframe tag.
Then, on the iFrame page itself (the src of the iframe) insert this in the Header:
Hope this helps someone else in the future. Cheers.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.