Skip to main content

Bug Tracker

Side navigation

#13626 closed bug (invalid)

Opened March 19, 2013 03:51PM UTC

Closed April 03, 2013 08:39AM UTC

.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>

Attachments (0)
Change History (2)

Changed March 19, 2013 04:42PM UTC by dmethvin comment:1

owner: → Ivan
status: newpending

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

Changed April 03, 2013 08:39AM UTC by trac-o-bot comment:2

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!