resize textarea to fit in a fluid width layout with javascript -
i have fluid layout , need textarea expand/reduce depending of size of parent container.
in css this:
textarea{ width: 100%; }
but doesn´t work textareas.
how can javascript? can parent element width , them calculate number of cols fit width how know size of 1 col (in px)?
chk out : http://css-tricks.com/box-sizing/
textarea { -webkit-box-sizing: border-box; /* safari/chrome, other webkit */ -moz-box-sizing: border-box; /* firefox, other gecko */ box-sizing: border-box; /* opera/ie 8+ */ }
Comments
Post a Comment