Yesterday I was working on the new Dmnd site that we will be releasing soon. While I was working on it, one of the things we wanted was a lightbox type login form. Everything was going good, I got a nice lightbox opening and closing but there was a problem. I was dimming the background of the site by creating a div with the css properties left:0 top:0 right0: bottom:0 and an opacity of 0.8. This allowed me to have the full background dimmed, except if the user scrolled down as the dimming div would move up with the site. I had a quick think about it and was wondering if there was anyway I could get the height of the full site and not just the browser in javascript, with this I could set the div height to that off the site to cover it.
In the end I decided to have a quick search online and see if anybody had suggested a way to do it, but nobody seemed to know. In the end an idea popped into my mind and I felt very silly for not thinking of it before. So if you every need to make a div dim the whole site all you need to do is make the div the size of the browse and make the position:fixed. The scroll bar will still work on your site but the dimming div will always stay fixed where it is.