469,356 Members | 2,641 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

Need Help!

jautrus
Hi, i have one big headache...

I need to display a DIV (400px by 300px) in EXACT center (vertical and horizontal) of the browser window in response of some events. Itís not very hard to do this by making the DIV position absolute and calculating and setting its left and top values. Problem arises when user scrolls the page and then DIV is displayed. Now DIV does not account for the scroll.

What I need is a solution to EXACTLY center (horizontally and vertically) a DIV in a browser window whenever it is displayed, regardless of browser window size or screen resolution or the amount of page that has been scrolled. If it keeps its center position even after being displayed and scrolled by the user then it would be much better.

The solution should work at least with IE and Firefox.
Please help me...
i almost lost the hope.... :/

Here is an image with more explonation: http://www.astavo.lt/div.gif
Sep 10 '06 #1
0 969

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by mike | last post: by
5 posts views Thread by John Flynn | last post: by
reply views Thread by xunling | last post: by
7 posts views Thread by Timothy Shih | last post: by
8 posts views Thread by skumar434 | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.