Possible duplicate:
why does jquery.height () get a different result on chrome?
I have a <div> with myclass CSS myclass . The CSS class is as follows:
.myclass { position: absolute; width: 192px; font-size: 11px; background-color: #FFF; padding: 15px 15px 0; box-shadow: 0 1px 3px rgba(34, 25, 25, 0.4); -moz-box-shadow: 0 1px 3px rgba(34, 25, 25, 0.4); -webkit-box-shadow: 0 1px 3px rgba(34, 25, 25, 0.4); display: block; }
He does not determine the height. PHP loads dynamically. In jQuery $(document).ready(function() { }); I am debugging div height by:
console.log($('div.myclass').height());
HTML:
<div class="myclass"> <img src="image.png" /> <p>Text here text here</p> </div>
However, if I use the Inspect Element feature in Google Chrome, it shows 531px . Why is there a difference? How can I get the value of 531px ?
UPDATE : $(this).outerHeight(); // 345px, as there is 15px margin $(this).outerHeight(); // 345px, as there is 15px margin
source share