|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anybody tell me how to get a form, lets say by size 200*200 and i want it in the centre of the screen. the problem at the moment is that i can't find out the screen dimensions. i need this code to work in both netscape and explorer.
|
|
#2
|
|||
|
|||
|
Ok. I now have the following code:
tmpstring="scrollbars=no, left=0, 0, width=100, height=100" newwindow = window.open('disclaimer/disclaimer/disclaimer.htm','newwin2',tmpstring) This works absolutely fine in Explorer, but the frame is full screen in Navigator. Anyone any ideas? |
|
#3
|
||||
|
||||
|
<script>
function init(){ pageW=document.layers?innerWidth:document.body.offsetWidth; pageH=document.layers?innerHeight:document.body.offsetHeight; mdiv=(document.layers)?eval('document.maindiv'):eval('maindiv.style') mdiv.left=(pageW/2)-100; mdiv.top=(pageW/2)-100; } </script> <body onload="init()"> <div id="maindiv" style="position:absolute;"> form here </div> will center a 200x200 layer in NS4 or IE 4+ ------------------ Simon Wheeler FirePages -DHTML/PHP/MySQL |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > screen size |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|