How to restrict max textarea width and height in chrome or how to disable textarea resizing

前端 未结 5 1150
说谎
说谎 2021-02-12 19:16

Chrome allowed to resize text area by drugging that on the bottom right corner, but some times this movement may break design of the page, so i am wondering how to restrict the

相关标签:
5条回答
  • 2021-02-12 19:39

    You can also restrict to horizontal resizing only with:

    resize: horizontal;
    

    and only vertical resizing with:

    resize: vertical; 
    
    0 讨论(0)
  • 2021-02-12 19:44

    This is all a matter of CSS. To disable the resizing (drag thumb) just use resize: none;. To restrict size max(min)-width and height should do the trick.

    0 讨论(0)
  • 2021-02-12 19:49

    You can disable re-sizing it with the following css:

    resize: none;
    
    0 讨论(0)
  • 2021-02-12 19:50

    you can use :

    resize: vertical; 
    max-height: 200px;
    
    0 讨论(0)
  • 2021-02-12 19:54

    you can use

    resize:none
    

    to restrict the resizing of a textarea.

    0 讨论(0)
提交回复
热议问题