Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style resize Property

Style resize Property

Style Object Reference The Style object

Example

Specify that the user can resize a div element:

document.getElementById("myDIV").style.resize="both";


Definition and Usage

The resize property specifies whether an element can be resized by the user.

**Note:** The resize property only takes effect when the element's overflow property is not "visible". In other words, for the resize property to work, you need to set the element's overflow property to auto, hidden, or scroll.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Firefox, Chrome, and Safari support the resize property.


Syntax

Return the resize property:

object

.style.resize

Set the resize property:

object

.style.resize="none|both|horizontal|vertical|initial|inherit"

Attribute values

Value Description
none Default. The user cannot resize the element.
both The user can resize the element's height and width.
horizontal The user can resize the element's width.
vertical The user can resize the element's height.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default value: none
Return Value: A string representing the element's resize property.
CSS version CSS3

Related Articles

CSS Reference Manual:resize property


Style Object Reference The Style object