I'm creating a form for my MVC Web application using Bootstrap 3. I'm having some trouble correctly aligning my file input fields. I used this resource to create them.
My form currently looks like this.
I'd like to align the text field which shows the filename with the rest of my fields. This is how the code looks:
<form>
<fieldset>
...
<div class="form-group">
<label for="inputDeliveryDate" class="col-lg-2 control-label">Delivery date</label>
<div class="col-lg-10">
<input type="date" class="form-control" id="inputDeliveryDate">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">Attachment</label>
<div class="col-lg-10">
<div class="input-group">
<span class="input-group-btn">
<span class=" btn btn-info btn-file">
Browse<input type="file" name="data" id="data">
</span>
</span>
<input type="text" id="uploadFile" class="form-control small" readonly />
</div>
</div>
</div>
<div class="form-group">
<label for="inputComment" class="col-lg-2 control-label">Comment</label>
<div class="col-lg-10">
<textarea class="form-control" rows="5" id="inputComment"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<button type="submit" class="btn btn-success">Submit</button>
</div>
</div>
</fieldset>
</form>
I tried wrapping the input fields in a col-xs-4 div but that doesn't seem to work.