#11009 closed bug (duplicate)
jQuery not considering current box model when returning current width of element.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | dimensions | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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
$("#container").width();
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
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
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
Component: | unfiled → dimensions |
---|---|
Priority: | undecided → low |
Resolution: | → duplicate |
Status: | pending → closed |
Note: See
TracTickets for help on using
tickets.
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.