Stack Diego
Stack Diego

Reputation: 1337

jquery mobile fieldset width

I have a jquerymobile fieldset that looks like this:

<fieldset data-role="controlgroup" data-type="horizontal" id="myid">

I want to set a custom width for the fieldset but don't know how to do it. How can I do this? (preferably without an external plugin)

Thanks

Upvotes: 2

Views: 3826

Answers (1)

Gajotres
Gajotres

Reputation: 57309

Solution

Here's an example of how to di it with fieldset containing select boxes: http://jsfiddle.net/Gajotres/xFPFH/

CSS used is:

.ui-controlgroup-controls {
    width:100% !important;
}

.ui-select {
    width:33% !important;
} 

EDIT :

Here's an example for radio buttons: http://jsfiddle.net/yUZy8/. When you multiply number of radio button widths it must be equal or greater of .ui-controlgroup-controls width.

More info

If you want to learn how to do this kind of changes by yourself you should check this article, it will teach you how to do this by yourself.

Upvotes: 4

Related Questions