HTML DOM Style resize Property
HTML DOM Style resize Property
Example
Specify that the user can resize the div element:
document.getElementById("myDIV").style.resize="both";
Definition and Usage
The resize property specifies whether or not an element can be resized by the user.
Note: The resize property only works when the element's overflow property is not "visible". That is, for the resize property to take effect, you need to set the element's overflow property value to auto, hidden, or scroll.
Browser Support
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"
Property Values
| Value | Description |
|---|---|
| none | Default value. The user cannot resize the element. |
| both | The user can resize both the height and width of the element. |
| horizontal | The user can resize the width of the element. |
| vertical | The user can resize the height of the element. |
| 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 resize property of the element. |
| CSS Version: | CSS3 |
Related Articles
CSS Reference: resize property
YouTip