Forum How do I...?

How do I change element height with javascript ?

vasilii
I use element.style.height to change the element height but I found from docs that:

The following DOM properties are not supported in Prince 8.0:
element.style // supported in Prince 8.1

How can I else change element height with javascript or should I wait for prince 8.1 ?
mikeday
The long way to do it is like this:
element.setAttribute("style", "height: 100px");

This will overwrite any existing style attribute, unfortunately. The style property will be supported in Prince 8.1, so you can just use:
element.style.height = "100px";