html text tag running into the next line on mobile -
my code follows
<div data-role="content" id="div1" align="top" style="padding:3 !important;" > <table border="0" align="center" cellspacing="0" width="100%" style="vertical- align: text-bottom;" > <tr> <td></td> <td> <div id="question1" class="question"> <input type="text" id="question" /> <style> #question{ font:5px; font-family:verdana; } </style> </div> </td></tr><tr> <td width="50"><img id="img2" width="40" height="36" style="float:right; margin-top: 0px;" ></td> <td style="text-align:center;"> <div class="ui-grid-b" > <div class="ui-block-a"><button id="button1" type="submit" data-theme="b" style="font-size:0.8em;"></button></div> <div class="ui-block-b"><button id="button2" type="submit" data-theme="b" style="font-size:0.8em;"></button></div> <div class="ui-block-c"><button id="button3" type="submit" data-theme="b" style="font-size:0.8em;"></button></div> </div> </td> </tr> </table> </div>
in block of code above, in following line of code
<input type="text" id="question" />
when value populated through jquery, i'm doing is
$('.question').text(questiontext);
and when view in iphone, text goes next line when it's longer width. thought textarea html tag has multiline. not sure why text here going multi-line , how avoid it? don't mind text cutting off don't want go multi line.
try applying overflow: auto
input field
<style type="text/css"> input[type=text] { overflow: auto; } </style>
you might need set height of input element, i'm not sure you're trying achieve here. set overflow-x: auto
if want scroll horizontally or overflow-y
vertical scrolling
Comments
Post a Comment