I'm getting different values for offsetwidth
for the same element in Firefox and Chrome, which makes the element display incorrectly. Please suggest some solution so as to have consistency.
I'm having a similar issue when I load content via AJAX with Firefox 12.
Both Chrome and IE9+ report the offsetWidth correctly after the the ready state is complete, but Firefox hasn't seem to have calculated it yet.
If you check a bit later (even delaying a half second sometimes), Firefox has the right width.
I suspect someone tried to make Firefox faster by firing the ready signal before they should be.
The original poster didn't give a lot of details, but I suspect this might be the problem.
Edit: P.S. The only way I've found to get this to work correctly is to delay and keep checking back until it has the right value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With