Ayman
Ayman

Reputation: 51

keep content in one line in bootstrap

How can i keep the below content in one line

<div class="row">
<div class="col-md-12">
    <div class="form-check form-check-inline">
        <label class="form-check-label">
            <input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1">
            Item<asp:TextBox ID="TextBox1" CssClass="form-control input-sm" runat="server"></asp:TextBox>
        </label>
    </div>
</div>

Upvotes: 1

Views: 9893

Answers (1)

Michael Coker
Michael Coker

Reputation: 53709

Add a nowrap class to the container for the elements you want to be on the same line, then add this .nowrap class to your CSS.

.nowrap {
  white-space: nowrap;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
  <div class="col-md-12">
    <div class="form-check form-check-inline nowrap">
      <label class="form-check-label">
        <input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1"> Item
        <asp:TextBox ID="TextBox1" CssClass="form-control input-sm" runat="server"></asp:TextBox>
      </label>
    </div>
  </div>

Upvotes: 4

Related Questions