# Auto size input height to fit content until a max height as the user types

**URL:** <https://community.weweb.io/t/auto-size-input-height-to-fit-content-until-a-max-height-as-the-user-types/7998>\
**Category:** How do I?\
**Created:** [April 8, 2024, 5:14pm UTC](https://community.weweb.io/t/auto-size-input-height-to-fit-content-until-a-max-height-as-the-user-types/7998 "2024-04-08T17:14:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![niknik39](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@niknik39](https://community.weweb.io/u/niknik39)\
**Post date:** [April 8, 2024, 5:14pm UTC](https://community.weweb.io/t/auto-size-input-height-to-fit-content-until-a-max-height-as-the-user-types/7998/1 "2024-04-08T17:14:15Z")

</div>

I have a multi-line input that I want to size with the input content, as the use types until it reaches a maximum height, then the user can scroll.

The input is inside a div with height = auto, that div is inside a container div with other divs, per the image. I want my center div to start out full height, as shown, and as the use types, it should shrink while the input div expands until the max 300px.

I tried binding to “fit-content” on the min-height and on the height with no effect.

How do I make this work?

 ![input-height-fit](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/cfd74034863d9a3ebb0108e8f573e4c658878a8b.png)

Note: my center div contains a list and it allows scrolling if the list expands beyond it’s display size.
