JavaScript
Article

jQuery Mobile 2 fields on one line example

By Sam Deering

Just logging some code for getting two jquery mobile form inputs on one line.

Should look something like this:

Image

HTML

*First Name: *Last Name:

CSS

/* register fields span 2 */
.halffield span.label {
    width: 120px !important;
    display: inline-block;
    margin-left: 15px;
}
.halffield input {
    width: 240px !important;
}
.halffield input:last-child {
    margin-right: 10px;
}

No Reader comments

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.