Setting left position DIV in Firefox with javascript

Posted on 2007-08-03
Medium Priority
Last Modified: 2013-12-07
I am trying to set the left position of a DIV in Firefox with javascript.
the pos variable is calculated but I left it out here, because that part works.

this is the code, it works in IE, but *turns on sarcastic mode* ofcourse not in Firefox

var pos = 100;

How can I make it work in firefox?

Question by:frollo
LVL 28

Accepted Solution

TName earned 1000 total points
ID: 19624422
Try to add 'px'

var pos = 100;

Author Comment

ID: 19624466
Thanks mate

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to dynamically set the form action using jQuery.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question