Skip to main content

Bug Tracker

Side navigation

#2247 closed bug (fixed)

Opened January 28, 2008 07:52PM UTC

Closed March 26, 2008 03:12AM UTC

Last modified March 26, 2008 03:12AM UTC

$.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.


Attachments (0)
Change History (4)

Changed February 17, 2008 07:08AM UTC by brandon comment:1

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

Changed February 25, 2008 06:39PM UTC by jeffkretz comment:2

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


Changed March 26, 2008 03:12AM UTC by brandon comment:3

resolution: → fixed
status: newclosed

Changed March 26, 2008 03:12AM UTC by brandon comment:4

Marked fix utilizing the CSS workaround for IE Quirks mode.