Along with jQuery, we have used third party module facebox for hindi lyrics. During testing different browsers, I got problem with placement of facebox.

In internet explorer (IE 6 & 7) it got aligned left.

So, finally I tried some cross browser hack for it. I have done some little change in facebox.js

At the end of function,

$.facebox.reveal = function(data, klass) {

I have added followng line,

b = $("BODY").width();
pl = (b - $('#facebox .content')[0].offsetWidth)/2;
$('#facebox')[0].style.paddingLeft = pl;


[1] If browser is Internet Explorer, it gets width of view port into b variable
[2] Now facebox width is $(’#facebox .content’)[0].offsetWidth
[3] So, required left padding is (total screen width - box with)/2
[4] $(’#facebox’)[0].style.paddingLeft = pl line properly aligns the facebox.