When a button is clicked i create a DIV and make it like a pop-up window, but i want the background around this box to be ‘shadowed’ and that it’s not possible to click on the links and inputfields there.
How can you make this with javascript?
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.
Directly inside the
<body>create a<div>and give it anid. In your<style>tag, give it the following style attributes (you can add more if you want):Raise its z-index as you see fit (make sure the pop-up has a higher z-index, though). You can also adjust the opacity of its color by changing the 4th value of the
rgba()object, ranging from 1 (opaque) to 0 (transparent). If it doesn’t occupy the entire page, make sure the<body>and<html>tags don’t have style attributes giving themmargins,padding, orborders.