jonyman wrote:
I have a DIV that encapsulates a table with the overflow-y property set
to 'scroll'
What I need is the scroll bar to start at the bottom so that the lowest
contents of the table are visible to the user first.
Any help would be appreciated!!!
1. No JavaScript requried: include an invisible anchor at the bottom of
the div content and modify the page URL:
<div style="overflow-y: scroll; ...">
...
<a name="bottomAnchor"></a>
</div>
And add #bottomAnchor to the page URL.
2. Unreliable script version: set the non-standard scrollTop property
to some value greater than the height of the content is ever likely to
be, but it may not work in IE or Mozilla in strict mode.
<div id="scrollMe" style="overflow-y: scroll; ...">
...
</div>
<script type="text/javascript">
document.getElementById('scrollMe').scrollTop = '10000';
</script>
--
Rob