JQuery Mobile and text strings

So, I would like to display textarea only one line.

But jQuery Mobile doesn't think so ... Regardless of the value that I set in the rows attribute, it always has a height of 2 lines ...

Will this be a solution?

+5
source share
2 answers

JQuery Mobile CSS sets a specific height for textarea elements:

 textarea.ui-input-text { height : 50px; -webkit-transition : height 200ms linear; -moz-transition : height 200ms linear; -o-transition : height 200ms linear; transition : height 200ms linear; } 

You can create your own rule to redefine this height to something more one-line:

 .ui-page .ui-content .ui-input-text { height : 25px; }​ 

Demo: http://jsfiddle.net/mEs8U/

+11
source

You can also use max-height to set auto-spill limits in textarea.

 textarea.ui-input-text { max-height : 100px; } 
+1
source

Source: https://habr.com/ru/post/955020/


All Articles