I am doing something like follow:
// get the screen height and width
var maskHeight = $(document).height();
var maskWidth = $(window).width();
// calculate the values for center alignment
var dialogLeft = (maskWidth/2) - ($('#dialog-box').width()/2);
But looks like it's not working in IE9.
Use:
Try this:
Or in IE 6+ in standards compliant mode: