fixed position of inner div related to its container
Posted
by Lina
on Stack Overflow
See other posts from Stack Overflow
or by Lina
Published on 2010-03-26T09:20:31Z
Indexed on
2010/03/26
9:23 UTC
Read the original article
Hit count: 254
html
|JavaScript
Hi, if have the following code:
<div id="container" style="position:relative; width:300px; height:300px; overflow:scroll;">
<div id="header">
</div>
<div>
a table of contents
</div>
</div>
how do i make the inner div with the id "header" follows when i scroll down the outer div "container"? TIA Lina
© Stack Overflow or respective owner