nemo_87
nemo_87

Reputation: 4791

Class 'row' won't work Bootstrap

I am having problems with 'row' class. It simply won't put controls in one row.

<div class="panel-body">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                @using (Html.BeginForm("Index", "Department", FormMethod.Get))
                {
                    <p>Search by: </p>
                    <input type="radio" checked="checked" value="Name" /> <text>Name</text>
                    <input type="text" class="input-sm form-control" />
                    <input type="submit" value="Search" class="btn btn-primary" />
                }
            </div>
        </div>
    </div>
</div>

Instead of one row I got this:

enter image description here

What I am doing wrongly here?

Upvotes: 0

Views: 53

Answers (1)

Carol Skelly
Carol Skelly

Reputation: 362610

It's because of the inputs, not the row. Just use form-inline..

      <div class="container">
            <div class="row">
                <div class="col-md-12 form-inline">

                    <p>Search by: </p>
                    <input type="radio" checked="checked" value="Name">
                    <text>Name</text>
                    <input type="text" class="input-sm form-control">
                    <input type="submit" value="Search" class="btn btn-primary">

                </div>
            </div>
      </div>

http://www.codeply.com/go/zRpkQFvmes

Upvotes: 1

Related Questions