Bug Tracker

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#10988 closed bug (invalid)

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

Reported by: aladjev.andrew@… Owned by: aladjev.andrew@…
Priority: low Milestone: None
Component: dimensions Version: 1.7.1
Keywords: ie7 ie8 Cc:
Blocked by: Blocking:

Change History (8)

comment:1 Changed 8 years ago by sindresorhus

Owner: set to aladjev.andrew@…
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.

comment:2 Changed 8 years ago by aladjev.andrew@…

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)

comment:3 Changed 8 years ago by mikesherov

Component: unfileddimensions
Priority: undecidedlow
Summary: outerHeight is less than heightouterHeight is less than height for <table> children when <table> has a negative margin

comment:4 Changed 8 years ago by addyosmani

Status: newopen

comment:5 Changed 8 years ago by dmethvin

Keywords: ie7 ie8 added

comment:6 Changed 7 years ago by mikesherov

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.

comment:7 Changed 7 years ago by trac-o-bot

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!

comment:8 Changed 7 years ago by mikesherov

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

Note: See TracTickets for help on using tickets.