I want to place a label horizontally adjacent to an input group. The problem is that the label doesn't align vertically with the input group. The input group hugs the top of the box (i.e. row); the label itself is determining the height of the row. I'm able to hack it by adding margin-top
to the input-group class, but I don't feel like that's a very responsive solution
I've looked at the following SO entries. The difference is that I want a larger font-size so these solutions don't work:
- How to vertically align label and input in Bootstrap 3?
- Why does using an input group break the baseline alignment in bootstrap?
- Bootstrap: How to place button next to input-group
Fiddle here: http://jsfiddle.net/marvery/o315v0g9/10/
HTML
<div class='row'>
<form class='col-xs-offset-2 col-xs-8' method="post">
<label id="sign_up_form_tagline">Wanna try it?</label>
<div class="input-group">
<input class="form-control" id="email" name="email" placeholder="Email Address" type="email" value="">
<span class="input-group-btn"> <button type="submit" class="btn btn-primary">Sign Up</button></span>
</div>
</form>
</div>
CSS
#sign_up_form_tagline {
float: left;
margin-right: 30px;
text-align: right;
text-transform: uppercase;
font-weight: bold;
font-size: 34px;
}
.input-group{
margin-top: 7px;
}
I am using Bootstrap 3.