Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11009 closed bug (duplicate)

jQuery not considering current box model when returning current width of element.

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: None
Component: dimensions Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


When using a css like this (using a different box model than the default):

#container {

padding: 12px;

box-sizing: border-box;

width: 500px;


when calling


I will receive 476 instead of 500, meaning it doesn't count the 24px padding.

Change History (4)

comment:1 Changed 11 years ago by sindresorhus

Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 11 years ago by jpate

looks like a duplicate of #11004 which I have mostly solved (works but doesn't deal with ie6/7 which don't support box-sizing css (they treat everything as box-sizing:border-box))

comment:3 Changed 11 years ago by timmywil

Component: unfileddimensions
Priority: undecidedlow
Resolution: duplicate
Status: pendingclosed

comment:4 Changed 11 years ago by timmywil

Duplicate of #11004.

Note: See TracTickets for help on using tickets.