Bug 95647
| Summary: | Margins in percentage are not always referring to the width of the container | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | dzmail90-dev |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | bfulgham, dzmail90-dev |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | All | ||
| URL: | http://jsfiddle.net/YyBeV/12/ | ||
dzmail90-dev
In current WebKit builds, when these conditions are met:
- a container block has the value absolute, relative or fixed on property position
- and a content block has the property position:absolute
then the margin-top and margin-bottom property of the content, when expressed in percentages, are NOT referring to the width of the containing block, but they are referring to the height of the containing block.
This is in contrast to what Firefox and Opera do: they always use the width of the container to calculate the margin (top/bottom/right/left) of the content when it is expressed in percentage.
A test case is visible here:
http://jsfiddle.net/YyBeV/12/
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Brent Fulgham
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.