Skip to main content

Bug Tracker

Side navigation

#6456 closed bug (worksforme)

Opened April 18, 2010 12:34PM UTC

Closed November 11, 2010 02:02AM UTC

Div border will affect the boxModel

Reported by: Owned by:
Priority: undecided Milestone: 1.4.2
Component: core Version: 1.3
Keywords: Cc:
Blocked by: Blocking:

When using css to set div's border will affect the judgments boxModel. But not this problem in 1.2.6. Here is a simple example:


<html lang="zh-tw">


<script type="text/javascript" src=""></script>

<style type="text/css">

div {

height: 2000px;

border: solid 1px red;

/* If you remove the border settings will be moved to the right place */



<script type="text/javascript">



move to h5's location


$("html, body").scrollTop($("h5").offset().top);

/* If you remove the border settings will be moved to the right place */

return false;









<a href="#">Click</a>



Attachments (1)
Change History (5)

Changed April 18, 2010 12:49PM UTC by comment:1

Sorry, the test environment is in ie6.

Changed October 29, 2010 04:54PM UTC by rwaldron comment:2

owner: →
priority: → undecided
status: newpending

Please provide a reduced jsFiddle test case, thanks!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists.

Changed October 29, 2010 05:03PM UTC by rwaldron comment:3

keywords: → needsreview

Changed November 10, 2010 08:37AM UTC by comment:4

status: pendingnew

test case, plz use ie

Changed November 11, 2010 02:02AM UTC by dmethvin comment:5

keywords: needsreview
resolution: → worksforme
status: newclosed This one works fine in IE8. Your example is using a non-specific "div" selector and is probably catching some other element injected into the document.