demo
demo

Reputation: 6235

Bootstrap styles isn't applied to HTML

<div class="form-inline">
    <div class="form-group ">
        <label for="txtTitle" class="control-label">
            <p class="text-info">Page Title</p>
        </label>
        <asp:textbox id="txtTitle" tabindex="14" runat="server" MaxLength="60" TextMode="SingleLine" CssClass="form-control input-sm"></asp:textbox>
    </div>
</div>

I have this peace of HTML - it should be inline form, but styles for form-inline isn't applied, even if bootstap is included.

enter image description here

I've tried it with my "local" bootstap and with bootstrap from cdn but nothing is working correctly.

Where can be my problem?

Upvotes: 0

Views: 82

Answers (1)

Mohammad Usman
Mohammad Usman

Reputation: 39322

From Bootstrap's documentation:

Add .form-inline to your form (which doesn't have to be a ) for left-aligned and inline-block controls. This only applies to forms within viewports that are at least 768px wide.

If you will run following code in Full Page mode you will see that inline-form styles are being applied.

.control-label .text-info {
  margin: 0;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-inline">
    <div class="form-group ">
        <label for="txtTitle1" class="control-label">
            <p class="text-info">Page Title</p>
        </label>
        <input type="text" id="txtTitle1" tabindex="14" MaxLength="60" TextMode="SingleLine" class="form-control input-sm">
    </div>
    <div class="form-group ">
        <label for="txtTitle2" class="control-label">
            <p class="text-info">Page Title</p>
        </label>
        <input type="text" id="txtTitle2" tabindex="14" MaxLength="60" TextMode="SingleLine" class="form-control input-sm">
    </div>
    <div class="form-group ">
        <label for="txtTitle3" class="control-label">
            <p class="text-info">Page Title</p>
        </label>
        <input type="text" id="txtTitle3" tabindex="14" MaxLength="60" TextMode="SingleLine" class="form-control input-sm">
    </div>
</div>

Upvotes: 1

Related Questions