Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Bootstrap CSS class appropriate for a div or a span that will make it look like an input?

I am trying to have some readonly data on the page that I want to put in a span or a div. And I would like this to look like a Bootstrap input field. This is similar to giving the class btn to a div to make it look like a button.

like image 556
4 revs, 2 users 76% Avatar asked Dec 04 '14 11:12

4 revs, 2 users 76%


1 Answers

<fieldset disabled>
          <div class="form-group">
            <label for="disabledTextInput" class="col-sm-2 control-label">Disabled input and select list (Fieldset disabled)</label>
            <div class="col-sm-10">
              <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
            </div>
          </div>
</fieldset>

Working fiddle http://jsfiddle.net/4bvsbkr2/2/

Update

  <fieldset disabled>
          <div class="form-group">
            <label for="disabledTextInput" class="col-sm-2 control-label">Disabled input and select list (Fieldset disabled)</label>
            <div class="col-sm-10">
              <span class="form-control">
                  Disabled
                </span>
            </div>
          </div>
</fieldset>

Fiddle http://jsfiddle.net/4bvsbkr2/15/

like image 157
Miomir Dancevic Avatar answered Oct 01 '22 14:10

Miomir Dancevic