Bug Tracker

Modify

Ticket #10988 (closed bug: invalid)

Opened 18 months ago

Last modified 11 months ago

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:
Blocking: Blocked by:

Change History

comment:1 Changed 18 months ago by sindresorhus

  • Owner set to aladjev.andrew@…
  • Status changed from new to pending

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 18 months ago by aladjev.andrew@…

  • Status changed from pending to new

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 16 months ago by mikesherov

  • Priority changed from undecided to low
  • Component changed from unfiled to dimensions
  • Summary changed from outerHeight is less than height to outerHeight is less than height for <table> children when <table> has a negative margin

comment:4 Changed 16 months ago by addyosmani

  • Status changed from new to open

comment:5 Changed 15 months ago by dmethvin

  • Keywords ie7 ie8 added

comment:6 Changed 12 months ago by mikesherov

  • Status changed from open to pending

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 11 months ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

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 11 months ago by mikesherov

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.