Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2247 closed bug (fixed)

$.fn.offset() is shifted by 2px in Quirks Mode

Reported by: jeffkretz Owned by: brandon
Priority: major Milestone: 1.2.3
Component: offset Version: 1.2.2
Keywords: Cc:
Blocked by: Blocking:


A recent change made to offset.js (rev 4016) no longer accurately accounts for the 2px html border added by IE in quirks mode.

See two sample pages:


Note the 1px bordered divs are all 2px offset from the images they should be laying in front of.


Is the same code but references a version of jQuery with the offset change rolled back to 4015. All divs are correctly positioned on each image.

Note that adding DOCTYPE strict or DOCTYPE transitional fixes this problem -- it only shows up in quirks mode.


Change History (4)

comment:1 Changed 15 years ago by brandon

Try adding the following CSS: html { border: 0; }

comment:2 Changed 15 years ago by jeffkretz

Well, I'll be durned. Not that I'm big on Quirks Mode or anything, but that solved it. JK

comment:3 Changed 15 years ago by brandon

Resolution: fixed
Status: newclosed

comment:4 Changed 15 years ago by brandon

Marked fix utilizing the CSS workaround for IE Quirks mode.

Note: See TracTickets for help on using tickets.