mwbarry Posted August 21, 2011 Share Posted August 21, 2011 I wrote a function to place an item 400px above the bottom of the users screen. It works fine in every browser except Firefox and I have no idea why. Firebug doesn't show any errors either.js <script type="text/javascript"> function chng() { cont = screen.availHeight - 400 + "px"; document.getElementById("stuff").style.top = cont; }</script> html <body onload="chng()"> <div id="stuff">this text is supposed to be placed 400px above the bottom of the users screen</div></body> css #stuff {width:100%;position: absolute;top: 50px; Link to comment Share on other sites More sharing options...
jeffman Posted August 21, 2011 Share Posted August 21, 2011 Seems to work in FF 5 just fine.What happens to yours?Do you need to refresh your cache? Link to comment Share on other sites More sharing options...
mwbarry Posted August 23, 2011 Author Share Posted August 23, 2011 Seems to work in FF 5 just fine.What happens to yours?Do you need to refresh your cache?In mine the item "stuff" stays at 50px from the top. In every other browser it moves down as it should.Do you know what the specific differences are in each browser in how they display items and use js? I checked FF JS preferences to make sure everything was activated. I can't think of any reason FF would fail to run this script without even returning an error in firebug while other browsers run it fine. All other scripts I have written work in FF fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.