Results 1 to 7 of 7
Dec 21, 2006, 02:16 #1
- Join Date
- Dec 2006
- 0 Post(s)
- 0 Thread(s)
How to get a div with overflow:auto to bring an inner div to the top
I have a div in a page with divs inside it and when an action happens in the page I want to bring an inner div to the top with script (depending on the action).
Here is what the HTML looks like:
<div style="overflow: auto; height: 10px;" id="container"><div id="first">Content</div><div id="second">Content</div><div id="third">Content</div><div id="fourth">Content<div></div>
I tried to set the scrolltop to 0 for the div with id == "fourth" without success.