I made a simple demo-page for my problem: http://jsfiddle.net/vvgv93k0/2/
As you can see it consists of an iframe
and a simple p
:
<iframe src="http://www.w3schools.com" width="100%" height="300"></iframe>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium do
What i would like to prevent is, that when the user clicks into the iframe, and then scrolls, the iframe is scrolled.
I want that only the main page is scrolled!
I tried to make my iframe not selectable with:
-webkit-user-select: none;
But that somehow didnt worked! Wht can i do so that the scroll is never perfromed in the iframe? Thanks!