CSS resize Property
Example
div {
border: 3px solid;
padding: 20px;
width: 300px;
height: 50px;
resize: vertical;
overflow: auto;
}
Meaning
The resize property sets whether an element is resizable, and if so, in which directions.
The resize does not apply to the following:
- Inline elements
- Block elements for which the overflow property is set to visible
Default value: | none |
Inherited: | No |
Animatable: | No |
Version: | CSS3 |
JavaScript syntax: |
|
Standard Syntax
resize: none|both|horizontal|vertical|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
none | This is default value. Specifies that the user cannot resize the element. |
both | Specifies that the user can resize both the height and width of the element. |
horizontal | Specifies that the user can resize the width of the element. |
vertical | Specifies that the user can resize the height of the element. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
resize: none;
}