Side navigation
#10117 closed bug (duplicate)
Opened August 23, 2011 10:05AM UTC
Closed November 28, 2011 02:34AM UTC
Last modified April 12, 2012 11:29AM UTC
[chrome] outerWidth(true) returns wrong results with mixed px- and %-values
Reported by: | m.schuhfuss@googlemail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | dimensions | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In chrome, there is a problem with the calculation of the outerWidth including the margin when, for example, the width is specified in pixels and the margin in percent.
The following code will demonstrate the problem:
In this case the margin (10%) will be added to the width (100px) as if it were percent, summing up to the wrong number of 120px.
Attachments (0)
Change History (11)
Changed August 23, 2011 10:06AM UTC by comment:1
Changed August 23, 2011 10:35AM UTC by comment:2
Even if the width is also specified in percent the result is the same: the width is correctly converted to px whereas the margins are not.
Changed September 09, 2011 02:42AM UTC by comment:3
No surprise, but this is confirmed behaviour in Safari 5.1 as well
Changed September 19, 2011 04:20PM UTC by comment:4
component: | unfiled → dimensions |
---|---|
priority: | undecided → low |
status: | new → open |
Changed October 18, 2011 03:35AM UTC by comment:5
yeah, percentage values for any of width,padding,margin,or border will result in the answer being goofy. If any of them contain percentages, the whole calculation should report 0.
This is also a needsdocs.
Very similar to ##9945
Changed November 26, 2011 02:55PM UTC by comment:6
Changed November 28, 2011 02:32AM UTC by comment:7
resolution: | → duplicate |
---|---|
status: | open → closed |
this is a dupe of #10639
Changed November 28, 2011 02:34AM UTC by comment:8
resolution: | duplicate |
---|---|
status: | closed → reopened |
Changed November 28, 2011 02:34AM UTC by comment:9
resolution: | → duplicate |
---|---|
status: | reopened → closed |
Changed November 28, 2011 02:34AM UTC by comment:10
Duplicate of #10639.
Changed April 12, 2012 11:29AM UTC by comment:11
related: http://bugs.jquery.com/ticket/11584
Replying to [ticket:10117 m.schuhfuss@…]:
Should read: ... as if it were ''pixels'' ..