目前这是我的代码。如何将HTML表单转换为2列
<table class="table table-bordered">
<tbody>
<tr>
<td>
<form name="form" ng-submit="" role="form">
<div class="form-group">
<label for="CustomerName">Customer Name</label>
<i class="fa fa-key"></i>
<input type="text" name="CustomerName" id="CustomerName" class="form-control" ng-model="CustomerName" required />
<span style="color:red" ng-show="form.CustomerName.$dirty && form.CustomerName.$error.required" class="help-block">Customer Name is required</span>
</div>
<div class="form-group">
<label for="CustomerAddress">Customer Address</label>
<i class="fa fa-key"></i>
<textarea type="text" name="CustomerAddress" id="CustomerAddress" class="form-control" ng-model="CustomerAddress" rows="4" required ></textarea>
<span style="color:red" ng-show="form.CustomerAddress.$dirty && form.CustomerAddress.$error.required" class="help-block">Customer Address is required</span>
</div>
<div class="form-group">
<label for="CustomerCity">Select City</label>
<i class="fa fa-key"></i>
<select name="CustomerCity" id="CustomerCity" class="form-control" ng-model="CustomerCity" required>
<option value="" ng-selected="selected">-- Select City -- </option>
<option value="Chhatarpur">Chhatarpur</option>
</select>
<span style="color:red" ng-show="form.CustomerCity.$dirty && form.CustomerCity.$error.required" class="help-block">City is required</span>
</div>
<div class="form-group">
<label for="CustomerMobile">Mobile Number</label>
<i class="fa fa-key"></i>
<input type="text" name="CustomerMobile" id="CustomerMobile" class="form-control" ng-model="CustomerMobile" maxlength="10" required />
<span style="color:red" ng-show="form.CustomerMobile.$dirty && form.CustomerMobile.$error.required" class="help-block">Mobile Number is required</span>
</div>
<div class="form-group">
<label for="PaymentOption">Payment Option</label>
<i class="fa fa-key"></i>
<div>
<input type="radio" name="myRadio" ng-model="myRadio" value="1" required> Cash on delivery<br />
<input type="radio" name="myRadio" ng-model="myRadio" value="2" required> Card on delivery<br />
</div>
</div>
</form>
</td>
<td>
<div class="form-group">
<label for="PaymentOption">Payment Option</label>
<i class="fa fa-key"></i>
<div>
<input type="radio" name="myRadio" ng-model="myRadio" value="1" required>Cash on delivery<br />
<input type="radio" name="myRadio" ng-model="myRadio" value="2" required>Card on delivery<br />
</div>
<span style="color:red" ng-show="form.myRadio.$dirty && form.myRadio.$error.required" class="help-block">Mobile Number is required</span>
</div>
<div class="form-actions">
<button type="submit" ng-disabled="form.$invalid" class="btn btn-danger">Place order</button>
</div>
</td>
</tr>
</tbody>
</table>
请注意,标记是在第一个内部(即第一列)。我想让第二列字段也是这个表格的一部分。
我应该在哪里移动窗体标签。我试图把它放在后面,但它不工作,因为我认为第一个标签应该是
我也可以使用容器,行和列类的twitter bootstarp,但也有同样的问题(一切都应该是内栏专业)
请帮我对此。
在twitter引导程序中,您可以将类“容器”或“容器流体”放在窗体中,或者只放置一个div标签,以便您可以轻松地将字段放入行和列中。 –