/    Sign up×
Community /Pin to ProfileBookmark

Available space of the browser window…

hey…
i’ve got a webpage that can be scrolled, and while loading, i want it to show a div that ocupes all the browser window, but without the space that can be scrolled… Like a floating layer that ocupes all the browser window…
but how can i retrieve the available space of a browser window, without taking into account the space it can be scrolled..?
tnx…

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@Mr_JOct 08.2005 — You could use

document.getElementById("divID").style.width=document.body.clientWidth

document.getElementById("divID").style.height=document.body.clientHeight

for NS you may have to use

window.innerWidth

window.innerHeight
Copy linkTweet thisAlerts:
@delr2691authorOct 08.2005 — thanks...

but that doesn't works...

it makes the div of the same height as the whole browser window...

go to this page and you will see what i want to do... =)

http://delr2691.bounceme.net/diego/loadingDiv.php
Copy linkTweet thisAlerts:
@LeruraOct 08.2005 — then just write the height you want instead of [COLOR=Red]document.body.clientHeight[/COLOR]
Copy linkTweet thisAlerts:
@Mr_JOct 09.2005 — delr2691

You asked

i want it to show a div that ocupes all the browser window[/QUOTE]

Then you say

but that doesn't works...

it makes the div of the same height as the whole browser window...[/QUOTE]


Slightly confused here
×

Success!

Help @delr2691 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...