Setting left position DIV in Firefox with javascript

Posted on 2007-08-03
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

    Try to add 'px'

    var pos = 100;
    LVL 4

    Author Comment

    Thanks mate

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    #Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now