.outerHeight( [ includeMargin ] ) Returns: Integer

Description: Get the current computed height for the first element in the set of matched elements, including padding and border.

  • version added: 1.2.6.outerHeight( [ includeMargin ] )

    includeMarginA Boolean indicating whether to include the element's margin in the calculation.

If includeMargin is omitted or false, the padding and border are included in the calculation; if true, the margin is also included.

This method is not applicable to window and document objects; for these, use .height() instead.


Get the outerHeight of a paragraph.

<!DOCTYPE html>
  <style>p { margin:10px;padding:5px;border:2px solid #666; } </style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
<script>var p = $("p:first");
$("p:last").text( "outerHeight:" + p.outerHeight() + " , outerHeight(true):" + p.outerHeight(true) );</script>