1

I'm looking for a way to enable mouse wheel events to a parent div while the user's mouse is within an iframe. On my website I have an iframe on the second page that takes up almost the entire screen. The issue is, when I try to scroll, it doesn't work unless my mouse is at the very top or very bottom of the page (outside of the iframe). The result is that most visitors likely wouldn't even realize this, and never see the third page, where I have my resume and "about me" blurb.

I'm kind of noob with web design/development, and may have bit off more than I could chew trying to implement iframes! Any help is greatly appreciated

itsseanl
  • 77
  • 1
  • 10

1 Answers1

-2

Just overlay the iframe with a transparent div. This will make the mousewheel work again, but it'll make the div unclickable.

mouse scrolling wheel not working when the cursor is on the iFrame

Community
  • 1
  • 1
Pingbeat
  • 305
  • 1
  • 9
  • Okay, so I did a search of "overlay iframe with div" and stumbled across [this](http://stackoverflow.com/questions/2094668/overlay-div-over-iframe) thread, which ended up working perfectly and took about 2 seconds. My iframe is just loading a script that I wrote and have saved in the public html directory of my site so it's exactly what I needed. So while your answer wasn't the exact solution I was looking for, you put me on the correct path! Thank you! – itsseanl Jan 16 '17 at 09:58
  • glad it helped in some way. – Pingbeat Jan 16 '17 at 11:01