Opened 14 years ago
Closed 14 years ago
#3322 closed bug (wontfix)
offset body does not work in Safari / Chrome
Reported by: | ajpotts | Owned by: | brandon |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | offset | Version: | 1.2.6 |
Keywords: | Cc: | ajpotts, flesler | |
Blocked by: | Blocking: |
Description
If the BODY is offset from the HTML then offset should report that number - but it's zero in webkit.
Test case here:
Change History (4)
comment:1 Changed 14 years ago by
Cc: | ajpotts flesler added |
---|---|
Component: | core → offset |
Owner: | set to brandon |
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
Firefox2 also does not get this right for exactly the same reasons.
comment:4 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Adding position relative to the body element opens up a huge mess when dealing with offset. Margin is okay in the latest SVN but position relative and borders just wreak havoc.
Note: See
TracTickets for help on using
tickets.
Addition: though this might seem an esoteric case, in fact if you make body { position: relative } then offset is going to be wrong for _all the time_ in Safari/Chrome, because it will miss the last step.
Styling the body with margin for centering or whatever is not uncommon: it means avoiding wrapping everything in an extra div tag. And if you do that, then you're likely to do a position:relative because you're most likely to want everything relative to the body than the html.