CSS Property resize








The resize property controls whether an element can be manually resized.

The resize property applies to elements whose overflow value is something other than "visible".

Summary

Initial value
none
Inherited
no
CSS Version
CSS3
JavaScript syntax
object.style.resize="both"
Animatable
no

CSS Syntax

resize: none|both|horizontal|vertical;

Property Values

none
Default value. The user cannot resize the element
both
The user can resize both the height and width
horizontal
The user can adjust the width
vertical
The user can adjust the height

Browser compatibility

resize Yes No Yes Yes Yes




Example

<!DOCTYPE html>
<html>
<head>
<style> 
div {<!--   w  w w.j  av a 2 s  .  c om-->
    border: 2px solid;
    padding: 10px 40px; 
    width: 300px;
    resize: both;
    overflow: auto;
}
</style>
</head>
<body>

<div>Resize me.</div>

</body>
</html>

Click to view the demo