Bug Tracker

Opened 7 years ago

Closed 7 years ago

#13626 closed bug (invalid)

.height() of element tr gives incorrect result in IE10 and Chrome

Reported by: Ivan Owned by: Ivan
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

I have a table with border-collapse and rows (<tr>) with specified boreder-bottom. jQuery height() reports actual height minus border width in IE10, CHROME25, but in firefox correct height is reported. http://jsbin.com/uvocon/1

<!DOCTYPE html PUBLIC "-W3CDTD HTML 4.01EN" "http://www.w3.org/TR/html4/strict.dtd"> <html>

<head>

<style type="text/css"> .row{border-bottom:10px solid green;background:yellow;} td{padding:0px;} </style>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

</head>

<script type="text/javascript" language="JavaScript"> $(document).ready(function() { $("#res").text($("#myRow").height()) $("#res2").text($("#myDiv").height()) }) </script> <body>

<div>

<table cellspacing="0" border="0" style="border-collapse: collapse; ">

<tr style="background:red;" >

<td ><div style="height:20px;">aaa</div></td>

</tr> <tr class="row" style="height:50px;" id="myRow">

<td ><div >aaa</div></td>

</tr>

</table>

</div>

<div id="myDiv" style="height:50px;border-bottom:10px solid green;"></div>

jQuery height of row: <span id="res">0</span> <br> jQuery height of div: <span id="res2">0</span>

</body>

</html>

Change History (2)

comment:1 Changed 7 years ago by dmethvin

Owner: set to Ivan
Status: newpending

Can you provide a link to the W3C spec reference that describes the correct behavior?

comment:2 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!

Note: See TracTickets for help on using tickets.