Problems setting the div height in firefox

J

jahull

This works fine in IE & opera, but not in firefox.

I basically have this ...

<div id="main">
<div id="preview" style="height: 600px; width: 200px">
some stuff in here...
</div>
</div>

I'm trying to set the height of that div.
I'm using....

document.getElementById("preview").style.height = SOME_NEW_HEIGHT;

That is setting fine in IE & opera, but not in firefox.

Any ideas??

I'm not a javascript guru by any means. Thanks.

You can check out my project i'm doing this for at:
http://sourceforge.net/projects/limpbrowser
 
D

David Dorward

document.getElementById("preview").style.height = SOME_NEW_HEIGHT;

That is setting fine in IE & opera, but not in firefox.

Any ideas??

Your probably trying to set the height to an integer, non-zero lengths
require units.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top