Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapper width is not always calculated exactly right (down to the decimals) #40

Open
generator85 opened this issue Oct 30, 2012 · 3 comments

Comments

@generator85
Copy link

In firefox I was having issues if the width of the wrapper was set as a percentage. Over time the content gets offset if the width of the wrapper is not exactly rounded to the exact pixel.

Wouldn't it be better if the wrapperWidth would be calculated using getBoundingClientRect() instead of clientWidth/clientHeight? getBoundingClientRect() returns the width in sub-pixel precision. It seems to have fixed my problem.

@cubiq
Copy link
Owner

cubiq commented Oct 30, 2012

interesting, thanks for the report. I'll check it out.

@generator85
Copy link
Author

This seems to work in most browsers, except for the Windows version of Chrome.

P.S: Sorry for closing and opening the issue, I accidentally pressed the button

@hungkienluu
Copy link

same problem here for Mac version of Chrome. very noticeable offsetting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants