1

Here is my demo http://jsfiddle.net/PZGQp/3/

In 'group 1' I have a radio group as a vertical controlgroup.

I am trying to put a text field to the right of each radio button - as in 'group 2' (code below).

Is it possible to do this while retaining the controlgroup behaviour of the radio buttons - failing that to have rounded rather than square corners on the radio buttons?

<fieldset data-role="controlgroup"   data-theme="b">
  <table width="100%">
    <tr>
      <td width="80%"><input type="radio" id="radio-1"  value="" class="radioclass" />
        <label for="radio-1">1</label></td>
      <td width="10%"><input type="text" placeholder="Qty" id="qty"></td>
    </tr>
    <tr>
      <td width="80%"><input type="radio" id="radio-2"  value="" class="radioclass" />
        <label for="radio-2">2</label></td>
      <td width="10%"><input type="text" placeholder="Qty" id="qty"></td>
    </tr>

      <td width="80%"><input type="radio" id="radio-3"  value="" class="radioclass" />
        <label for="radio-3">3</label></td>
      <td width="10%"><input type="text" placeholder="Qty" id="qty"></td>
    </tr>
  </table>
</fieldset>
4

1 回答 1

1

我希望我正确地理解了你。

工作jsFiddle示例:http: //jsfiddle.net/Gajotres/uwq8b/

使用的 HTML:

<div class="ui-grid-a">
    <div class="ui-block-a">
        <fieldset data-role="controlgroup"  data-theme="a">
            <input type="radio" id="radio-1"  name="radio-1" value="" class="radioclass" />
            <label for="radio-1">1</label>

            <input type="radio" id="radio-2"  name="radio-1" value="" class="radioclass" />
            <label for="radio-2">2</label>

            <input type="radio" id="radio-3"  name="radio-1" value="" class="radioclass" />
            <label for="radio-3">3</label>
        </fieldset>        
    </div>
    <div class="ui-block-b">
        <input type="text" placeholder="Qty" id="qty"/>
        <input type="text" placeholder="Qty" id="qty"/>
        <input type="text" placeholder="Qty" id="qty"/>
    </div>
</div><!-- /grid-a -->

使用的 CSS:

.ui-block-a {
    width: 80% !important;
    padding-top: 0.5em;
}

.ui-block-b {
    width: 20% !important;
    padding-top: 0.5em;    
}

fieldset.ui-controlgroup {
    margin: 0 !important;
}

div.ui-input-text {
    margin: 0 0 0.3em 0 !important;
}
于 2013-07-03T09:10:39.100 回答