Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS can a textarea auto-fit within a div? Re: can a textarea auto-fit within a div?

#80333
ghiblifan
Member
"chriscoyier" wrote:
Is it common that the parent element of the text area changes in width? If not, skip the % width and set it statically.

Thanks, but yes it does in a way.. I wanted to just set a single style to apply to all textareas, so wherever they appear, they end up being as big as their container allows. So it will be various widths at various times. Regardless, I thought dynamic resizing was easy to do in CSS, but the content-box model makes it damn difficult.

Thank god CSS3 is formalising border-box as an options. I can see lots of people wanting to use it for web apps. Apps are often different animals to normal pages, and we need good design tools to make them app-like. W3C is on another planet in that respect.