tags:

views:

47

answers:

3

i want to create a grey out as that of gmail when we try to upload an exe. the grey out screen should cover the whole screen even the scrollbars, the scrollbars should be visible through it but disabled how this can be achieved using javascript and css please dont tell me to set the overflow of body to hidden.

+1  A: 

Did you try looking at the gmail page, with a tool like Firebug, when it's greyed out this way ?

It'll allow you to see exactly how they do it ;-)


Apparently, after a quick look, it seems they're using a <div> such as this one :

<div class="Kj-JD-Jh" style="opacity: 0.5; width: 1560px; height: 366px;"></div>

The interesting thing here is that this 1560px is bigger than the visible area of my screen : it includes the right scroll bar.

Pascal MARTIN
yup but iam not getting it
Mac
setting the width that much is not enough there must be some other way
Mac
+1  A: 

Top level Scrollbars are browser components and not part of the canvas. Thus it is not possible to grey them out. You can only grey out scrollbars that are part of the HTML view.

Otherwise see this

http://stackoverflow.com/questions/159914/css-javascript-use-div-to-grey-out-section-of-page

kazanaki
then how they did this in gmail
Mac
+2  A: 

It only works if you wrap your whole page inside a div and set this div to allow scrolling but disallow the body from scrolling (or use iframes).

In gmail, the body has overflow:hidden. The scrollbars you see belong to an iframe with id canvas_frame.

Gaby
I was thinking the same thing +1
Sem Dendoncker