Actually in the center of current view, above all other objects.
Cross-browser and without 3rd party plugins and etc.
Via CSS or Javascript
UPDATE:
I tried to use Javascript’s Sys.UI.DomElement.setLocation() but this positioning object not in absolute location but relative to it’s parent.
Is there a function to put in absolute location?
To have it center in the browser, regardless of the page scroll (which is probably what you want), position: fixed will be more reliable. Amending mike108’s code:
This assumes you have a fixed size box you are showing. If you don’t have a fixed size box, you’ll need to use Javascript to measure the window and the div and position it explicitly (again, fixed is probably the way to go).
Do test on all your browsers, though. There may be something we’re not thinking of.
I’d actually recommend you look at one of the Javascript plugins that does this, at least for a starting point. They have figured it out, even if you don’t want to use their code. I think I used jqModal as a starting point.