FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Complete screen overlaps

 


rohan2kool
Well... i actually wanna make a <div> that completely covers the window. Much like lightbox does it. [Lightbox: http://www.huddletogether.com/projects/lightbox/]

I think it's most probably a CSS trick... but that's what i wanna know. How can i get a <div> that is of the complete width and height of the browser's view area. With CSS, width: 100% works, but not the same story with height.

thanks a lot,
rohan
badai
1. make the position absolute

2. set the div to be the size of "display area" using
window.innerWidth / document.body.clientWidth
window.innerHeight / document.body.clientHeight

3. place the div at top left corner with
document.getElementById("div_id").style.left=1 (or is it 0?) / div_id.style.left = 1
document.getElementById("div_id").style.top=1 / div_id.style.top = 1
rohan2kool
badai wrote:
1. make the position absolute

2. set the div to be the size of "display area" using
window.innerWidth / document.body.clientWidth
window.innerHeight / document.body.clientHeight

3. place the div at top left corner with
document.getElementById("div_id").style.left=1 (or is it 0?) / div_id.style.left = 1
document.getElementById("div_id").style.top=1 / div_id.style.top = 1


that's fine... that's something i'm using right now.. but i'd like to do it using pure CSS. It's not for a dynamic script.. but a static page sort of thingy. It's for pages to which you have like read-only access and it's like a symbolic way of saying, "You're not allowed here".

And as for the left/top, it's 0 Very Happy

thanks a lot for the help neways

rohan
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.