我有一个很大的表单,所以整个向导中的许多字段都有相同的问题。“联系人电话号码”下的复选框将导致其余内容被逐出线路。
我已尝试将
页边距底部设置为
to
0
which does minimized the gap but it is still obligent.
<div class=“form group”>
<label for=“联系人电话”style=“margin:0”>联系人电话号码<span style=“color:red;”>*</span></label>
<small style=“margin:0”><br>与您的主电话号码相同?</small>
<input type=“checkbox”name=“samenum”>
<input type=“text”class=“Form Control输入sm”/>
&L/DIV & GT;
如果删除<br>复选框,则该复选框与标签放在同一行。
我还尝试在联系人姓名字段下面添加一个占位符,如下所示:
<small><br> /small>
不过,这看起来相当糟糕

保持所有字段对齐的最佳方法是什么?
我试过设置margin-bottom到0这确实使间隙最小化,但仍然很明显。
<div class="form-group">
<label for="contact_tel" style="margin: 0">Contact Telephone Number <span style="color:red;">*</span></label>
<small style="margin: 0"><br>Same as your main telephone number?</small>
<input type="checkbox" name="sameNum">
<input type="text" class="form-control input-sm"/>
</div>
如果我移除<br>复选框与标签放在同一行。
我还尝试在contact name这样的字段:
<small><br> </small>
不过,这看起来相当糟糕

保持所有字段对齐的最佳方法是什么?