简体   繁体   中英

Text Area Auto Height in Bootstrap

I am Developing an Hybrid app using Cordova. I am facing the problem to make Height of Text Area as 50% which will give my app a uniform look on all devices like Tablet,cell phones etc. I tried to google it and try all stuff but did not find a proper solution. Can some one please help me ?

<textarea cols="50%">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>

I tried some thing like this

well you need to set the height, not the width. the cols sets the width and the attribute rows set the height.

use this code to set the height to 50% of the viewport.

<textarea rows="50%">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>

 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <textarea rows="50%"> At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies. </textarea> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM