Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:21:39+00:00 2026-06-17T23:21:39+00:00

so I have a div with the following css: #MyDiv { position: absolute; overflow:

  • 0

so I have a div with the following css:

#MyDiv {
    position: absolute;
    overflow: visible;
    top: 0px;
    right: 50%;
    width: 49%;
    height: 99%;
    min-width: 250px;
    min-height: 400px;
    max-width: 400px;
    max-height: 500px;
    background-color: #FFFFFF;
    border: 1px solid #000000;
    margin: 0 auto;
    padding: 0px;
}

and i’m animating it to the right with jquery by 800 pixels. In firefox the final position is the desired one, however in chrome and opera it’s wrong.

    alert($("#MyDiv").position().left);
    $("#MyDiv").animate({left: "+=" + 800 + "px"}, 1000, "linear", function() {
        alert($("#MyDiv").position().left);
    });

in firefox the initial left position is 23 (first alert) and the final 823 (second alert)
in chrome and opera the final position is 800

am i doing something wrong? there is a requirement to keep the css unchanged.

p.s. ie8 has also some issues but to a lesser extent than chrome and opera

thanks in advance.

edit jsfiddle : http://jsfiddle.net/Q8K2R/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:21:41+00:00Added an answer on June 17, 2026 at 11:21 pm

    Other way is to setup css left attribute, because animation works with css, and here is no guarantie, that left attribute contains correct calculated data, so fix can be like

    var mydiv=$("#MyDiv");
    mydiv.css({left: mydiv.position().left});
    

    before animate
    DEMO

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div with the following css: #div { position:absolute; right:0; top:0; }
I have a container div with the following CSS: #container { position:relative; overflow:hidden; width:200px;
I have a <div id=outer> which has the following css: position:relative; width:300px; height:125px; float:left;
I have a div.scroll_fixed with the following CSS .scroll_fixed { position:absolute top:210px } .scroll_fixed.fixed
I have a div with following CSS: div { width:600px; height:auto; } Now my
I have a div that has the following css: position: fixed; height: 100%; left:
Hi I have a following css : div.container { height:20px; overflow: hidden; margin: 15px
I have a div with the following CSS: #feedback { min-height: 24px; line-height: 24px;
I have div with the following css style: width:335px; float:left; overflow:hidden; padding-left:5px; When I
I have a DIV with the following css .divTab { width: 700px; height: 550px;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.