In javascript I need to show div content on the center of the browser window; Content of the window is high therefore it has a scroll.
How can I set up div element on the center of the screen independently of the scroll ?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use this CSS (You don’t need javascript for that):
You can check out the demo here including scrolling
You can make the div pretty with additional CSS.
Check out demo