Thursday, July 21, 2005

style.top = 85 doesn't work in Firefox

I spend abour 35 minutes this morning to figure about why element.style.top doesn't work in firefox 1.04. The code is simple, its basically assinging an integer value to the element style top.

el.style.top = 85;

it doesn't work in firefox. Finally, I solved this problem by :

el.style.top = 85 + 'px';

Jobs done !

32 comments:

Anonymous said...

Well done you

Anonymous said...

You save my day man!!! thanks a Bunch.

Anonymous said...

Thank god.. I added the doctype strict, and it broke firefox.. this solved my problems

Anonymous said...

Thanks a lot for giving solvation regarding div position using js

Anonymous said...

Мужик!!!!!!!!!!

adam said...

oh man, thanks a lot!

Anonymous said...

Thank you, and thank google for helping me find this

Anonymous said...

thanks

Anonymous said...

thanks a lot.

Anonymous said...

Thank you very much

Anonymous said...

Bravo, olé !!

Anonymous said...

Thank you man

Anonymous said...

firefox 3 and this solution is still the same, thanks a lot...

Anonymous said...

you have inspired me to fix a 3 days problem...


thx. sometimes a solution is too simple to consider...

Anonymous said...

Cheers mate, I was going to commit suicide.

Soumya Panda said...

Hi,
Thank you very much.....You solved my problem.and thanks to Google.

Anonymous said...

thanks for helping me too.

Anonymous said...

Thanks for the blog - thought I was going mad.

Anonymous said...

Thank you very much.
I had this problem.

Anonymous said...

Thank you.. spent a lot of time trying to fix this issue

Anonymous said...

Thanks!!! tricky solution

Shubhankar said...

Thanks Man!! You R a real genious.

Anonymous said...

4 years down the line and you saved me a couple of (hours) i can say... Thanks!

Ricardo Ribeiro said...

Thank you so much, you saved me ;)

Anonymous said...

This was a huge help. I have been struggling for days.

Anonymous said...

Сто пудов мужик!!!!!!! Спасибо!!!

Anonymous said...

Dankeschön!

Anonymous said...

Thanks bud .. working perfectly now!

Anonymous said...

Thanks a lot. Saved my time.

Anonymous said...

5 years later you are still saving lives :)

Anonymous said...

great help.. i was struggling

Anonymous said...

Thanks for the simple solution.