Element.clientHeight

  • Revision slug: DOM/element.clientHeight
  • Revision title: element.clientHeight
  • Revision id: 120913
  • Created:
  • Creator: GT
  • Is current revision? No
  • Comment /* Example */

Revision Content

From the page: http://www.mozilla.org/docs/dom/domref/clientHeight.html DHTML property that represents the inner height of an element. This includes possible padding but not scrollbar (if present, if rendered), not border nor margin. If the element has an horizontal scrollbar, then its height value is substracted from the css height property value and from the vertical css padding value of the element in the computation of the clientHeight value.

Syntax

intElemClientHeight = element.clientHeight;

Paramters

  • intElemClientHeight is a variable storing an integer corresponding to the clientHeight pixel value of the element.

Notes

An element's clientHeight is a measurement which includes the element CSS height and the element vertical padding and, if rendered, substracting the height of horizontal scrollbar.

Example

LeftTopRight

Bottommargin-topmargin-bottom

border-topborder-bottom{{mediawiki.external('if IE')}}> <span id="MrgLeft" style="position: absolute; left: 8px; top: 65px; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;">margin-left</span> <span id="BrdLeft" style="position: absolute; left: 33px; top: 65px; color: white; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;">border-left</span><span id="PdgLeft" style="position: absolute; left: 55px; top: 65px; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;">padding-left</span> <span id="PdgRight" style="position: absolute; left: 275px; top: 60px; color: black; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl; white-space: nowrap;">padding-right</span><span id="BrdRight" style="position: absolute; left: 310px; top: 65px; color: white; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;">border-right</span> <span id="MrgRight" style="position: absolute; left: 340px; top: 65px; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;">margin-right</span> <!{{mediawiki.external('endif')}}

padding-top

Gentle, individualistic and very loyal, Birman cats fall between Siamese and Persian in character. If you admire cats that are non aggressive, that enjoy being with humans and tend to be on the quiet side, you may well find that Birman cats are just the felines for you.

{{mediawiki.external('img id=\"BirmanCat\" src=\"BirmanCatToInsert\" width=\"129\" height=\"69\" alt=\"\"')}} All Birmans have colorpointed features, dark coloration of the face, ears, legs and tail.

padding-bottom

Image:clientHeight.png

Specification

clientHeight is part of the MSIE's DHTML object model. clientHeight is not part of any W3C specification or technical recommendation.

Notes

clientHeight is a property of the DHTML object model which was first introduced by MSIE. It represents the inner height of an element.

References

Report errors or corrections or relevant feedback about this file (bug 196779); web design questions will be ignored.

Revision Source

<p>
</p><p>From the page: http://www.mozilla.org/docs/dom/domref/clientHeight.html
<a href="en/DHTML">DHTML</a> property that represents the inner height of an element. This includes possible padding but not scrollbar (if present, if rendered), not border nor margin. If the element has an horizontal scrollbar, then its height value is substracted from the css height property value and from the vertical css padding value of the element in the computation of the clientHeight value.
</p>
<h3 name="Syntax">Syntax</h3>
<pre class="eval"><i>intElemClientHeight</i> = element.clientHeight;
</pre>
<h3 name="Paramters">Paramters</h3>
<ul><li><code>intElemClientHeight</code> is a variable storing an integer corresponding to the clientHeight pixel value of the element.
</li></ul>
<h3 name="Notes">Notes</h3>
<p>An element's <b>clientHeight</b> is a measurement which includes the element CSS height and the element vertical padding and, if rendered, substracting the height of horizontal scrollbar.
</p>
<h3 name="Example">Example</h3>
<div id="offsetContainer" style="margin: 26px 0px; background-color: rgb(255, 255, 204); border: 4px dashed black; color: black; position: absolute; left: 260px;"><span style="position: absolute; left: -32px; top: 85px; color: blue; font: bold 13px Arial, sans-serif !important;">Left</span><span style="position: absolute; left: 170px; top: -20px; color: blue; font: bold 13px Arial, sans-serif !important;">Top</span><span style="position: absolute; left: 370px; top: 85px; color: blue; font: bold 13px Arial, sans-serif !important;">Right</span>
<p><span style="position: absolute; left: 164px; top: 203px; color: blue; font: bold 13px Arial, sans-serif !important;">Bottom</span><span style="position: absolute; left: 143px; top: 5px; font: italic bold 13px Arial, sans-serif !important;">margin-top</span><span style="position: absolute; left: 138px; top: 175px; font: italic bold 13px Arial, sans-serif !important;">margin-bottom</span>
</p>
<span style="position: absolute; left: 143px; top: 27px; color: white; font: italic bold 13px Arial, sans-serif !important;">border-top</span><span style="position: absolute; left: 138px; top: 153px; color: white; font: italic bold 13px Arial, sans-serif !important;">border-bottom</span><span class="comment">{{mediawiki.external('if IE')}}&gt; &lt;span id="MrgLeft" style="position: absolute; left: 8px; top: 65px; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;"&gt;margin-left&lt;/span&gt; &lt;span id="BrdLeft" style="position: absolute; left: 33px; top: 65px; color: white; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;"&gt;border-left&lt;/span&gt;&lt;span id="PdgLeft"  style="position: absolute; left: 55px; top: 65px; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;"&gt;padding-left&lt;/span&gt; &lt;span id="PdgRight" style="position: absolute; left: 275px; top: 60px; color: black; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl; white-space: nowrap;"&gt;padding-right&lt;/span&gt;&lt;span id="BrdRight"  style="position: absolute; left: 310px; top: 65px; color: white; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;"&gt;border-right&lt;/span&gt; &lt;span id="MrgRight" style="position: absolute; left: 340px; top: 65px; font: bold 13px Arial, sans-serif !important; writing-mode: tb-rl;"&gt;margin-right&lt;/span&gt; &lt;!{{mediawiki.external('endif')}}</span><div id="idDiv" style="margin: 24px 29px; border: 24px black solid; padding: 0px 28px; width: 199px; height: 102px; overflow: auto; background-color: white; font: 13px Arial, sans-serif !important;"><p id="PaddingTopLabel" style="text-align: center; font: italic bold 13px Arial, sans-serif !important; margin: 0px;">padding-top</p>
<p>Gentle, individualistic and very loyal, Birman cats fall between Siamese and Persian in character. If you admire cats that are non aggressive, that enjoy being with humans and tend to be on the quiet side, you may well find that Birman cats are just the felines for you.</p>
<p>{{mediawiki.external('img id=\"BirmanCat\" src=\"BirmanCatToInsert\" width=\"129\" height=\"69\" alt=\"\"')}} All Birmans have 
colorpointed features, dark coloration of the face, ears, legs and tail.</p>
<p id="PaddingBottomLabel" style="text-align: center; font: italic bold 13px Arial, sans-serif !important; margin: 0px;">padding-bottom</p></div>
</div>
<p style="margin-top: 270px;"><img alt="Image:clientHeight.png" src="File:en/Media_Gallery/ClientHeight.png"></p>
<h3 name="Specification">Specification</h3>
<p>clientHeight is part of the MSIE's DHTML object model.
clientHeight is not part of any W3C specification or technical recommendation.
</p>
<h3 name="Notes_2">Notes</h3>
<p>clientHeight is a property of the DHTML object model which was first introduced by MSIE. It represents the inner height of an element.
</p>
<h3 name="References">References</h3>
<ul><li> <a class="external" href="http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/clientheight.asp?frame=true">MSDN's clientHeight definition</a>
</li><li> <a class="external" href="http://msdn.microsoft.com/workshop/author/om/measuring.asp">MSDN's Measuring Element Dimension and Location</a>
</li></ul>
<p>Report errors or corrections or relevant feedback about this file <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=196779">(bug 196779)</a>;
web design questions will be ignored.
</p>
Revert to this revision