title: How can I scroll an iframe in iOS 4 with 2 fingers?
body: <p>I've found many related questions but none with an answer that explains how to scroll an <code>iframe</code> using the 2 finger method in iOS 4.</p>
  
  <p>I am able to scroll a <code>div</code> with 2 fingers by setting a <code>width</code> and <code>height</code> attribute and setting <code>overflow: scroll;</code>. Here's a more complete example of this:</p>
  
  <pre><code>&lt;div style='width: 280px; height: 200px; overflow: scroll; -webkit-overflow-scrolling: touch;'&gt;
        Just imagine a bunch of content is in here, spanning well over 200px
        worth of height. You can scroll this just fine in iOS 4 by using 2 
        fingers, or in iOS 5 by swiping 1 finger thanks to 
        "-webkit-overflow-scrolling: touch;".
  &lt;/div&gt;
  </code></pre>
  
  <p>This same method isn't working on <code>iframes</code> on my iPad 1 running iOS 4.3. Here's a complete example that won't scroll with any combination of fingers in iOS 4 (although, of course, the <code>-webkit-overflow-scrolling</code> allows it to work on iOS5):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;style type="text/css"&gt;
      #scroller {
          width: 280px;
          height: 200px;
          overflow: scroll;
          -webkit-overflow-scrolling: touch;
      }
      #scroller iframe {
          width: 100%;
          height: 100%;
      }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="scroller"&gt;
      &lt;iframe src="content.html"&gt;content.html is a big list of nonsense.&lt;/iframe&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>I must add</strong> that I <em>can</em> get 2 finger scrolling to work if I set the <code>width</code> and <code>height</code> of the <code>iframe</code> to actual pixel values, like <code>height: 1000px;</code>, but I will never know how tall the iframe's content will be. So, perhaps the real question is how can I convince mobile Safari in iOS 4 that the <code>iframe</code> inside of this <code>div</code> is indeed larger than 280x200 pixels?</p>