This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

pixelHeight

Summary

Changes the value of the height without changing the units designator.

Property of css/cssom/propertiescss/cssom/properties

Syntax

var result = element.pixelHeight;
element.pixelHeight = value;

Examples

This example uses a timer to increment the pixelHeight property.

<SCRIPT>
function scaleThis()
{
    if (sphere.style.pixelWidth <900) {
        sphere.style.pixelWidth += 4;
        sphere.style.pixelHeight +=4;
        window.setTimeout("scaleThis();", 1);
    }
}
:
</SCRIPT>

View live example

Notes

Remarks

Setting this property changes the value of the height without changing the units designator. Unlike the height property, this property’s value is an integer, not a string, and is always interpreted in pixels.

See also

Related pages

Attributions