Skip to main content

Bug Tracker

Side navigation

#10988 closed bug (invalid)

Opened December 09, 2011 02:22PM UTC

Closed June 25, 2012 08:26AM UTC

Last modified June 25, 2012 11:15AM UTC

outerHeight is less than height for <table> children when <table> has a negative margin

Reported by: aladjev.andrew@gmail.com Owned by: aladjev.andrew@gmail.com
Priority: low Milestone: None
Component: dimensions Version: 1.7.1
Keywords: ie7 ie8 Cc:
Blocked by: Blocking:
Attachments (0)
Change History (8)

Changed December 09, 2011 02:45PM UTC by sindresorhus comment:1

owner: → aladjev.andrew@gmail.com
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.

I get 100 on both on Chrome. So please also specify which browser you're using.

Changed December 09, 2011 03:11PM UTC by aladjev.andrew@gmail.com comment:2

status: pendingnew

win xp. ie 7, 8. if you like jsFiddle see http://jsfiddle.net/UHDaG/

if table has margin less than 0 (for example margin-top: -100px) outerHeight will be broken (for example 0px)

Changed January 18, 2012 12:37AM UTC by mikesherov comment:3

component: unfileddimensions
priority: undecidedlow
summary: outerHeight is less than heightouterHeight is less than height for <table> children when <table> has a negative margin

Changed February 01, 2012 12:11PM UTC by addyosmani comment:4

status: newopen

Changed March 10, 2012 04:13PM UTC by dmethvin comment:5

keywords: → ie7 ie8

Changed June 11, 2012 12:22AM UTC by mikesherov comment:6

status: openpending

please read: http://www.w3.org/TR/CSS2/tables.html#height-layout and http://www.w3.org/TR/CSS2/tables.html#table-layout

"Internal table elements do not have margins."

"The height of a 'table-row' element's box is calculated once the user agent has all the cells in the row available: it is the maximum of the row's computed 'height', the computed 'height' of each cell in the row, and the minimum height (MIN) required by the cells."

In short, while TR's can have height (which is not wholely determined by the css provided), they can not have margin. Some browsers inherit the margin from the parent TABLE and others allow setting the property on a TR, but neither value is the correct one. Simply don't user outerheight on a TR.

Please let me know what the use case here is on why you were trying to measure margin on a TR.

Changed June 25, 2012 08:26AM UTC by trac-o-bot comment:7

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed June 25, 2012 11:15AM UTC by mikesherov comment:8

I know this got autoclosed... needs docs maybe? Don't try to measure margin on a TR?