gpt4 book ai didi

twitter-bootstrap - 标签和文本字段在同一行

转载 作者:行者123 更新时间:2023-12-03 00:08:42 25 4
gpt4 key购买 nike

有人可以看一下示例并帮助我制作水平标签和输入字段吗?目前它是标签,其下方是输入字段。我需要标签:输入字段。

http://jsfiddle.net/dUG4f/4/

    <div class="row">
<div class="col-xs-6">
<div class="panel panel-primary">
<div class="panel-heading"><h3 class="panel-title">Application Information</h3></div>
<div class="panel-body">

<div class="row">
<div class="col-lg-6 col-lg-6">
<div class ="form-group">
<label for="text" >Contract State</label>
<div class="input-group">
<select name="State" id="State" class="validate[required] form-control">
<option value="">Choose a State</option>
<option value="IL">Illinois</option>
<option value="MN">Minnesota</option>
<option value="WI">Wisconsin</option>
</select>
</div>
</div>

<div class ="form-group">
<label for="text" >Application Number</label>
<div class="input-group">
<input class="validate[required] text-input form-control" type="text" name="AppNumber" id="AppNumber" />
</div>
</div>


</div> <!-- col-lg-6 col close -->
</div> <!-- row close -->
</div> <!-- End of panel Body -->
</div><!-- End of panel -->
</div> <!-- end col-xs-6 -->

如何将标签右对齐并左对齐控件,并在其间留有边距间隙?

enter image description here

最佳答案

在标签中添加类并赋予样式:向左浮动

<div class ="form-group">
<label for="text" style="float:left;margin-right:5px;">Application Number</label>
<div class="input-group">
<input class="validate[required] text-input form-control" type="text" name="AppNumber" id="AppNumber" />
</div>
</div>

关于twitter-bootstrap - 标签和文本字段在同一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19278152/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com