#10117 closed bug (duplicate)
[chrome] outerWidth(true) returns wrong results with mixed px- and %-values
Reported by: | 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: http://jsfiddle.net/NXRW2/3/
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.
Change History (11)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
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.
comment:3 Changed 12 years ago by
No surprise, but this is confirmed behaviour in Safari 5.1 as well
comment:4 Changed 12 years ago by
Component: | unfiled → dimensions |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:5 Changed 12 years ago by
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
comment:6 Changed 12 years ago by
comment:7 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | open → closed |
this is a dupe of #10639
comment:8 Changed 12 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:9 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Replying to m.schuhfuss@…:
Should read: ... as if it were pixels ..