Old 30-03-2008, 06:26   #1 (permalink)
jcharnley
Registered User
 
jcharnley's Avatar
 
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?
  Reply With Quote
Old 30-03-2008, 07:36   #2 (permalink)
haku
shiro
 
haku's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,084
I think I have heard that innerWidth isn't supported by IE. Can't give you advice on how to fix it though.
  Reply With Quote
Old 30-03-2008, 11:46   #3 (permalink)
bluesage
Senior Member
 
Join Date: Dec 2006
Location: Switzerland
Posts: 351
__________________
www.benshu.ch // Evolving with Style

  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8