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

  • SEARCH
  • Home
  • 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 8930087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:48:21+00:00 2026-06-15T08:48:21+00:00

I have centered (position: absolute; left: 50%; margin: -50px;) 100px width div (container). It

  • 0

I have centered (position: absolute; left: 50%; margin: -50px;) 100px width div (container).

It has absolutely positioned child div with overflow: hidden, its size is 100x2000 px (such height is for test purposes, as described below).

There is an image in child div, it is absolutely positioned.
The image is 3100x100 px, it contains frames of animation.

I am animating this image by changing its style.left from 0 to -1100px, step is 100px.
Everything is fine, but I encounter weird issue when body width is not even.

It can happen if there is scrollbar and the scrollbar has odd width (it happens for me on Chrome/Win32 for example).
In this case image visually shifts by 1 pixel horizontally as soon as animated image goes through screen edge (for 1920×1080 it happens roughly at 9-10 frame of animation).
I can’t find workaround for this behavior.

Working example reproducing the problem can be found here

Child div height is set to 2000px to make sure scrollbar is visible.
If your scrollbar has even width, you can reproduce the problem by resizing your browser window to odd width.

  • 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-15T08:48:22+00:00Added an answer on June 15, 2026 at 8:48 am

    To me this seems like a bug in Chrome. When percentages are defined in integers, they behave rather unexpectedly. Try to define the position as a decimal instead:

    .outer {
        position: absolute;
        left: 49.99999%;
        margin-left: -50px;
    }
    

    I tested this on the fiddle and it seems to do the trick.

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

Sidebar

Related Questions

My site has a 900px div #content that is centered with margin-left: auto and
I have a website with a centered fixed width div (the div is centered
i have a HTML page with a centered div of 780px width and 8400px
I have an image with a play/pause button positioned absolute and centered over top.
I have a div $(#organizer_listings_container) initially centered using CSS margin: 0 auto; which uses
I have a div that is absolute positioned (because it holds sub-divs that are
I would like to have several absolutely positioned div containers within my one larger
I have the code below: #div1 { position: relative; width:800px; height:540px; top: 50%; left:
I have made menu and centered it using css: margin-left:auto; margin-right: auto; . This
I have a problem with the animate() function in jQuery: $(this).addClass(activeClass).animate({ position: 'absolute' width:

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.