How can I prevent twitter bootstrap's label from breaking new line? -
say have text input field , label. input appears in new line right after label. need them both in same line. how can bootstrap?
it depends; in form? use horizontal form:
<form class="form-horizontal"> <div class="control-group"> <label class="control-label" for="inputemail">email</label> <div class="controls"> <input type="text" id="inputemail" placeholder="email"> </div> </div> <div class="control-group"> <label class="control-label" for="inputpassword">password</label> <div class="controls"> <input type="password" id="inputpassword" placeholder="password"> </div> </div> </form>
alternatively, using row
class different span
classes should achieve result you're after:
<div class="row"> <div class="span3"> <label for="txtname">name:</label> </div> <div class="span9"> <input type="text" id="txtname" name="name" /> </div> </div>