1

This is how the modal looks like now. How can I get the modal wider?

One thing that works is using this

<span class="input-group-addon" id="sizing-addon1">

But it makes all the fields like this. Notice the grey thing on the left. It also makes the last input field smaller vertically.

Edit: Solved! This seems to do the trick.

input style="width:100%"

Thanks anyway!

Here's the code.

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">New message</h4>
      </div>
      <div class="modal-body">
        <form role="form">

          <div class="form-group">
            <label for="first-name" class="control-label"></label>
            <input type="text" class="form-control" id="first-name" placeholder="First name">
          </div>

          <div class="form-group">
            <label for="last-name" class="control-label"></label>
            <input type="text" class="form-control" id="last-name" placeholder="Last name">
          </div>

          <div class="email">
            <label for="recipient-name" class="control-label"></label>
            <input type="email" class="form-control" id="email" placeholder="Your email">
          </div>

          <div class="form-group">
            <label for="message-text" class="control-label"></label>
            <textarea class="form-control" id="message-text" placeholder="Enter your message here."></textarea>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Send message</button>
      </div>
    </div>
  </div>
</div>
Olli
  • 33
  • 1
  • 7

2 Answers2

0

There are various classes for different size inputs

 :class=>"input-mini"

 :class=>"input-small"

 :class=>"input-medium"

 :class=>"input-large"

 :class=>"input-xlarge"

 :class=>"input-xxlarge"

OR

in bootstrap 3.0 :

Set heights using classes like .input-lg, and set widths using grid column classes like .col-lg-*.

<div class="row">
    <div class="col-xs-2">
        <input type="text" class="form-control" placeholder=".col-xs-2">
    </div>
    <div class="col-xs-3">
        <input type="text" class="form-control" placeholder=".col-xs-3">
    </div>
    <div class="col-xs-4">
        <input type="text" class="form-control" placeholder=".col-xs-4">
    </div>
</div>

http://getbootstrap.com/css/#forms-control-sizes

Community
  • 1
  • 1
Dr.Tricker
  • 553
  • 3
  • 19
0

use bootstrap 3.0

few changes in

<div class="modal-body">

replace with

<div class="modal-body col-md-12 col-lg-12">

and replace with

 <div class="form-group col-md-4 col-lg-4">
Shadow Walker
  • 206
  • 1
  • 2
  • 13