following is my html code.and when the height of div1 is inceaseed to be larger than the window then you can't scroll the scrollbar to see the bottom of the page,why? Thanks! My purpose is to put div2 intermediately after div1.
<html> <body bgcolor="#000000" leftmargin=0 topmargin=0 > <div id="div1" style="position:relative; z-index:1; top:96;left:201; padding:40;padding-top:40; background-color:#fff; width:600; height:500;"> a test message </div> <div style="position:relative; z-index:1; top:96;left:201;text-align:center; width:600; background-color:red;"> 00001001 </div> </body> </html>
Top is the problem
From my limited experience, I have noticed that when you use a div that is relatively positioned, the browser will cut off the bottom where the div should have ended with a top: 0. The way I work around this problem is to base my relative div from the very top. If you want your div to be positioned 96px down the page, try creating a relative div that contains a blank spacer.gif and set the height of the image to 96. Then go back and change Div1 and Div2's top to 0px.
Hope this helps.