Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to grey out the full browser window and display a form in the center?

Tags:

javascript

css

Have you come across those websites that grey out the full browser window and show you a notification or ask you to fill in a survey .. etc? This used to happen with myspace, if you mistyped in the email or password the full browser window would grey out (it's transparent though, you still can see the contents of the page through it) and a the login controls would display in the center of the browser window with an error message above them telling you that you mistyped the email or password. Unfortunately they removed this from myspace, I want the same code for a website I'm working on and was trying to avoid reinventing the wheel, do you know of any source to find this code instead of writing the whole thing again? I assume this is mostly CSS, Javascript is only used for showing/hiding, am I right?

like image 745
Waleed Eissa Avatar asked Jan 18 '09 11:01

Waleed Eissa


2 Answers

If you're thinking of using a JavaScript framework, jQuery has the Block UI plugin. Very easy to use and configure.

Demos here

like image 132
Russ Cam Avatar answered Oct 13 '22 01:10

Russ Cam


You can also use only CSS and Javascript for this: Create a Modal Dialog Using CSS and Javascript and submodal

like image 43
Dror Avatar answered Oct 13 '22 01:10

Dror