开发者

modify width of processing div

开发者 https://www.devze.com 2023-03-06 17:44 出处:网络
I have this div that appears on loading pages: <div id=\"divProcessing\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; background-color: transparent;z-Index: 2000;ove

I have this div that appears on loading pages:

<div id="divProcessing" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; background-color: transparent;  z-Index: 2000;overflow:hidden; display:none;border:none;"/>

My pr开发者_C百科oblem is that on a page that has scroll bars the div is not expanded on all the page, only on screen size and i can access the content behind the div if i scroll.

I don't know how to expand or how to calculate the width/height of content page


I would use jquery, and you can get the height of the body element.

$(body).css('height');

So you could then do the following:

$('#divProcessing').css('height', $(body).css('height') );

Which then sets your div's height to the same as the body of your page.

Edit: You mentioned width specifically but I was thinking height, the same will work for width, just replace 'height' with 'width'


If the div is a direct child of body, you can try adding:

html, body {
    height: 100%;
    overflow: hidden;     /* in case your content is floated */
}

Do you have a page online where we can see it?

0

精彩评论

暂无评论...
验证码 换一张
取 消