There is one problem with combining horizontal relative positioning and margins of inline elements. It happens with both inline and replaced elements, so you can see it in the last two tests (possibly four - I plan to expand the test a little to help isolate the problem) of these two pages: non-replaced: http://www.fas.harvard.edu/~dbaron/csstest/sec100301 replaced: http://www.fas.harvard.edu/~dbaron/csstest/sec100302 The problem is that right: -10px; margin-right: 20px; puts all 20px of space on the right side of the element, rather than 10px on each side.
For the non-replaced elements, the problem is simply that you are ignoring "right" altogether. If left is auto, then left:=-right, otherwise right := - left (per CSS2 errata). I should add a simple "right" test. For the replaced elements, the problem seems as I described it before, and therefore shows on all four tests at the end.
Summary: horizontal relative positioning and margins of inline elements → ignoring right on inline elements
Whoops... typo in the tests (forgot to change the class="" on the second test!). The problem is now much simpler: You are ignoring right on inline elements. Fix is as described for non- replaced elements in my previous comment. Retitling bug to "ignoring right on inline elements" (from "horizontal relative positioning and margins of inline elements")
This seems to have been fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
Fixed during recent line-layout/inline-reflow rework. The values computed by the html-reflow-state (thanks troy!) work dandy.
You need to log in before you can comment on or make changes to this bug.