jkkenzie Posted July 5, 2008 Share Posted July 5, 2008 In the line "document.floater.style.top="20%";" of the code below, it does not affect anything on mozilla firefox even if i put more percentage, but it does affect internet explorer, how can i make it affect mozilla?? I thought this would come under html because the page am running is html and alot of settings happen with html. <html> <head> <title>emoinvestments.com</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="flashfloat.js"></script> <script type="text/javascript" src="flashobject.js"></script> </head> <body bgcolor="#FFFFFF"> <table width="100%" height="20%"> <tr><td><img src="logos/EMO%20Logo%20450.png" align="left" width="100" height="100"></td><td><font size="+2" color="#0000CC"> EMO INVESTMENTS LIMITED</font></td> <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="457" height="49" accesskey="12" tabindex="12" title="emo"> <param name="movie" value="slogan.swf"> <param name="quality" value="high"> <embed src="slogan.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="457" height="49"></embed> </object></td> </tr></tr> </table> <hr><br> <div id="image_marquee_id" > <script type="text/javascript"> var fo = new FlashObject("menu.swf","floater","120","400","6","#FFFFFF"); fo.addParam("menu","false"); fo.addParam("quality","best"); fo.addParam("salign","LT"); fo.addParam("scale","noscale"); fo.addParam("wmode","window"); fo.write("image_marquee_id"); if (navigator.appName.indexOf("Microsoft")!= -1) { document.floater.style.position="absolute"; document.floater.style.zIndex="10"; document.floater.style.left="0px"; document.floater.style.top="20%"; }else{ document.getElementById('floater').style.position="absolute"; document.getElementById('floater').style.zIndex="10"; document.getElementById('floater').style.left="0px"; document.getElementById('floater').style.top="20px"; } </script> </div> </Body> </html> Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 6, 2008 Share Posted July 6, 2008 firefox will use this line... document.getElementById('floater').style.top="20px"; so I'd change the px to % and play with that. incidentally - IE would respond to that code too so there is little point in you have the logic control in there just use teh snippet within the 'else' block. Quote Link to comment Share on other sites More sharing options...
jkkenzie Posted July 6, 2008 Author Share Posted July 6, 2008 i have gotten the javascript code for both firefox and IE. If you need it let me know. Thanks, Joe Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 6, 2008 Share Posted July 6, 2008 what I was alluding to is that if (navigator.appName.indexOf("Microsoft")!= -1) { document.floater.style.position="absolute"; document.floater.style.zIndex="10"; document.floater.style.left="0px"; document.floater.style.top="20%"; }else{ document.getElementById('floater').style.position="absolute"; document.getElementById('floater').style.zIndex="10"; document.getElementById('floater').style.left="0px"; document.getElementById('floater').style.top="20px"; } need only be document.getElementById('floater').style.position="absolute"; document.getElementById('floater').style.zIndex="10"; document.getElementById('floater').style.left="0px"; document.getElementById('floater').style.top="20%"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.