i need an absolute div to scroll down as the page does,the div center itself automactly on the browser resize, heres how i have it,

<div " id="window1" style=" display:none; position:absolute; left:50%; margin-left:-200px; top:50%; margin-top:-200px; width:400px; height:400px; background-color:#963"></div>

the problem is that it doesnt scroll, what can i do to make it follow the page?

Recommended Answers

All 3 Replies

Have you tried using CSS for the style of the page?
CSS is supposed to be used now.

instead of; position:absolute; try position:fixed; fixed is supposed to be relative to the browser window.

that made the trick thank you a lot

If you want to center it use margin: 0 auto;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.