Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inline form fields: search box and button in jQuery-Mobile

This is what I am trying to achieve:

enter image description here

This is what I get:

enter image description here

Please view the JSFiddle of this with web-kit browser (Chrome or Safari): http://jsfiddle.net/KqEqN/

This is happening when you narrow the screen but there's still visibly enough space for the button. I've looked into CSS trying to find some sort of padding to the right of the button but couldn't. Also where the hell that horizontal line comes from?

like image 976
Ruslan Avatar asked Oct 10 '22 13:10

Ruslan


1 Answers

I'm not familiar with jQuery Mobile, so I might be doing this wrong. My guess is that you must add extra classes instead of overriding jQuery Mobile's theme.

The fix involves:

.ui-input-search {
    width: 50px;
    display: inline-block;
}

Check it in action here: http://jsfiddle.net/NqFhQ/

like image 93
methodofaction Avatar answered Oct 20 '22 05:10

methodofaction