Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap horizontal form "control-label" not using responsive styling

I'm using the "form-horizontal" class with Bootstrap 2, but my labels don't seem to be utilizing the Responsive styling. This is what it looks like:

enter image description here

When I examine it, it specifically has "width:160px" on the label, which is the regular Bootstrap setting, but the Responsive styling just has "width:auto".

My HTML for that section looks like this:

<form id="addproject" class="form-horizontal">
    <div class="control-group">
        <label for="title" class="control-label">Title</label>
        <div class="controls">
            <input type="text" name="title" id="title" />
        </div>
    </div>
</form>
like image 583
James P. Wright Avatar asked Nov 04 '22 14:11

James P. Wright


2 Answers

bootstrap.css must be loaded before the bootstrap-responsive.css file.

like image 175
jevanler Avatar answered Nov 07 '22 21:11

jevanler


.control-label is only specified in responsive.css for (max-width: 480px). Have you tried shrinking the width way down? When I use the forms, they look like your example until 480px, at which point the labels move above the input fields.

like image 32
LVB Avatar answered Nov 07 '22 20:11

LVB