Click to See Complete Forum and Search --> : Alert Box with CSS


cancer10
08-14-2008, 08:17 AM
Hey,

I am sure you must have seen that Javascript alert window on some or other site that floats in the middle of your screen.

Can you please tell me how do I make such a notification box with CSS, that would float at the middle of my screen.


Screenshot:
http://img139.imageshack.us/img139/9721/sssssssssssf0.th.jpg (http://img139.imageshack.us/my.php?image=sssssssssssf0.jpg)

Thanx

gil davis
08-14-2008, 09:31 AM
CSS doesn't know anything about the computer screen, only the document that the CSS resides in, which may or may not be centered on the screen. You can only center things relative to the browser window using CSS.

KDLA
08-14-2008, 10:21 AM
Also, are you wanting this box to appear via a hover, or upon another action?
CSS can only make things appear via hover. Other behaviors require javascript or some other type of coding.