| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2007
Location: Denmark 4600
Posts: 82
|
a javascript height problem
i have this script: <script language="JavaScript"> function jresize(){ var winwidth = document.body.clientWidth:window.innerWidth; var distancetop = (winwidth*1 - 700)/2; document.getElementById("loginbox").style.marginTo p = distancetop+"px"; } </script> To get a div#loginbox centered. (the #loginbox is 700px high) Works fine in FFX, but not at all in IE6&7. Help? |
|
|
|
|
|
#3 (permalink) |
|
Senior Member
Join Date: Dec 2006
Location: Switzerland
Posts: 351
|
this should help: JavaScript tutorial - Window size and scrolling |
|
![]() |