freelance84 Posted May 10, 2010 Share Posted May 10, 2010 I've noticed on some web pages (eg Facebook), the size of text areas can start at 2 lines high but then as the user inputs more text the height can grow to accommodate the text. How is this done? <textarea style="max-height:50px;" name="additional_comment" cols="20" rows="1"></textarea> I assumed it would be a simple max-height job but, no. Quote Link to comment https://forums.phpfreaks.com/topic/201237-text-area-height/ Share on other sites More sharing options...
freelance84 Posted May 10, 2010 Author Share Posted May 10, 2010 Sorry, just realized what I should be searching for... dynamic text area height Quote Link to comment https://forums.phpfreaks.com/topic/201237-text-area-height/#findComment-1055734 Share on other sites More sharing options...
freelance84 Posted May 10, 2010 Author Share Posted May 10, 2010 Actually its looking like its not really possible with out the use of js. does anyone know of any ways without js? Quote Link to comment https://forums.phpfreaks.com/topic/201237-text-area-height/#findComment-1055737 Share on other sites More sharing options...
haku Posted May 11, 2010 Share Posted May 11, 2010 It's not possible without JS. The best you can do without JS is have scrollbars manually added as the text inside the textarea expands beyond the height of the textarea. Quote Link to comment https://forums.phpfreaks.com/topic/201237-text-area-height/#findComment-1056235 Share on other sites More sharing options...
freelance84 Posted May 12, 2010 Author Share Posted May 12, 2010 Yea I thought as much. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/201237-text-area-height/#findComment-1056992 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.