输入旁边的引导标签 [英] bootstrap label next to input
本文介绍了输入旁边的引导标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在输入字段的标签旁边放置标签,而不是使用引导程序在其上方放置标签。将其包装为 form-horizontal
可以,但是实际上不是一种形式(只是读取值的ajax调用)。有没有一种方法可以简单地将标签移动到输入的左侧?
I'm trying to put an input field's label next to it instead of above it using bootstrap. Wrapping this in form-horizontal
works, but it's not actually in a form (just an ajax call that reads the value). Is there a way to simply move the label to the left side of the input?
<div class="controls-row">
<div class="control-group">
<label class="control-label" for="my-number">ALabel</label>
<div class="controls">
<input id="my-number" type="number"/>
</div>
</div>
</div>
小提琴位于 http://jsfiddle.net/7VmR9/
推荐答案
是的,您可以通过引导列结构来实现。
Yes, you can do this by bootstrap column structure.
<div class="form-group">
<label for="name" class="col-lg-4">Name:</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="name" id="name">
</div>
</div>
这里是Bootply 演示
Here is a Bootply Demo
这篇关于输入旁边的引导标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文