Barrie Reader
Barrie Reader

Reputation: 10713

jQuery Mobile input widths

I can't seem to change the width of the <input> tags on my jQuery Mobile page, any ideas?

http://www.nuhack.com/stackoverflow-question/

Upvotes: 3

Views: 16569

Answers (2)

user2814778
user2814778

Reputation: 306

to make the button wrapped around the text, use data-inline="true"

<input  data-inline="true" id="btn_1"  type="button" value="click here"/></h4>

Upvotes: 4

Omar
Omar

Reputation: 31732

jQuery Mobile wraps all input types in a div with class .ui-input-text except for type=search which has class .ui-input-search. All you need is to override those classes.

Demo

All input types:

div.ui-input-text { width: 50px !important }

input type search:

div.ui-input-search { width: 50px !important }

Upvotes: 11

Related Questions