Skip to content
Related Articles

Related Articles

Improve Article

How to disable resizable property of textarea using CSS?

  • Difficulty Level : Medium
  • Last Updated : 04 Dec, 2018
Geek Week

This resizable property is used to set the resizable area of elements. It is mostly used with textarea and div elements. To disable resizable property of an element use resize to none. It is the default value.

Syntax

resize: none;

Example:




<!DOCTYPE html>
<html>
    <head>
        <title>Disable resize property</title>
        <style
            h1 {
                color:green;
            }
            body {
                text-align:center;
            }
            textarea {
                overflow:auto;
                resize:none;
                width:200px;
                height:100px;
            }
        </style>
    </head>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2>Disable resize property</h2>
        <textarea>GeeksForGeeks: A computer science portal for 
        geeks. It is a good platform to learn programming.
        </textarea>
    </body>
</html>                    

Output:

Supported Browsers: The browser supported by resize property are listed below:

  • Apple Safari 4.0
  • Google Chrome 4.0
  • Firefox 5.0
  • Opera 15.0

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :