absolute offset height and scrollTo
<p>this code position a div tag according to .offset() and scrolls down to the div element.. the div tag is positioned right but the scrollTo scrolls way over?</p>

<p>I cant really figure out whats wrong?</p>

<pre><code>var offset = row.offset();
$('html').animate({
        scrollTop : offset.top
    },
    500,
    'linear',
    function(){
        var highlight = $('&lt;div class="insert_highlight" style="top:'+offset.top+'px; left:'+offset.left+'px; width:'+row.width()+'px; height:'+row.height()+'px"&gt;&lt;/div&gt;').appendTo($(document.body))
            .delay(800)
            .fadeOut(1200, 'linear', function(){
                highlight.remove();
            });
    });
</code></pre>

<p>style</p>

<pre><code>div.insert_highlight {
    position:absolute;
    background:#00ff00;
    z-index:-1;
    opacity:0.4;
    filter:alpha(opacity=40);
}
</code></pre>

<p>EDIT:</p>

<p>I dont know if it could have something to do with this? all content on the page is placed in this table</p>

<pre><code>&lt;table style="width:100%; height:100%"&gt;
    &lt;tr&gt;
        &lt;td style="padding-top:130px"&gt;
...
</code></pre>

<p>even if I replace the padding-top with this the scrollTo scrolls way over</p>

<pre><code>&lt;div style="height:130px"&gt;&lt;/div&gt;
</code></pre>

<p>EDIT again:</p>

<p>I have now pasted a print screen in photoshop to measure the position of the appended div and the top position is right...</p>
