Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>EDIT:</strong> I've found that if you set "top" style to, say, -120 it should "scroll" the div down by those 120px.</p> <p>Here an HTML example (sorry for all the inline styles): </p> <pre><code>&lt;div id="container" style="position:relative; display:block; overflow:scroll; height:100px; border:1px solid;"&gt; &lt;div style="position: relative; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(255, 255, 255)), to(rgb(0, 0, 0))); height: 300px; width: 100%; background-position: initial initial; background-repeat: initial initial;" id="frm"&gt; &lt;p&gt;Message 1&lt;/p&gt; &lt;p&gt;Message 2&lt;/p&gt; &lt;p&gt;Message 3&lt;/p&gt; &lt;p&gt;Message 4&lt;/p&gt; &lt;p style="color:#fff"&gt;Message you want to see right now&lt;/p&gt; &lt;p&gt;Message 5&lt;/p&gt; &lt;p&gt;Message 6&lt;/p&gt; &lt;p&gt;Message 7&lt;/p&gt; &lt;p&gt;Message 8&lt;/p&gt; &lt;/div&gt; </code></pre> <p></p> <p>And the Javascript part:</p> <pre><code>&lt;script type="text/javascript"&gt; function init() { document.getElementById("setScroll").addEventListener('click',function() { document.getElementById("frm").style.top = -120;//Scroll by 120px }); } &lt;/script&gt; </code></pre> <p>I have tested this on 3.0 and 4.0 versions of Android (I must say it was on the emulator thought).</p> <p>Hope this helps!</p> <p><strong>ORIGINAL MESSAGE:</strong></p> <p>Scroll top seems to not be working in some versions of Android as reported <a href="http://code.google.com/p/android/issues/detail?id=19625" rel="nofollow">here</a>, and there's no definitive answer from Google about this (looks like mainly 3.0 and 4.0 have this issue, 2.3 and bellow or 4.1 doesn't seem to be affected).</p> <p>Sorry, but it seems like there's no solution right now for this bug.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload