jQuery .width() and .height() strange behaviour
- by Misha Moroshko
Why in the following code .height() returns 95 rather than 100, while .width() returns 200 as expected ?
HTML:
<table><tr>
<td id="my"></td>
</tr></table>
<div id="log"></div>
CSS:
#my {
border: 5px solid red;
}
JS:
$("#my").width(200).height(100);
$("#log").append("Width = " + $("#my").width() + "<br />");
$("#log").append("Height = " + $("#my").height());