Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap alignment of label and regular text

I have been trying to get the text to properly align vertically with no luck. Could I get some assistance?

Alignment Problem

Here is the underlying code:

    <div class="form-group">
        <label class="control-label col-md-2">Permalink</label>
        <div class="col-md-10">
            http://www.somedomain.com/cart/@Model.Offer.Id
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Offer.DateCreated, new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DisplayFor(model => model.Offer.DateCreated)
            @Html.ValidationMessageFor(model => model.Offer.DateCreated)
        </div>
    </div>
like image 893
FrankO Avatar asked Feb 12 '14 18:02

FrankO


1 Answers

Per Bootstrap docs, you can use <p class="form-control-static">[email protected]</p> to properly align static text in form groups.

like image 88
dlane Avatar answered Nov 04 '22 16:11

dlane