How to make an inline form with bootstrap without using tables

Asked

Viewed 5,020 times

1

I’m not a designer, but I need a form inline without using table and responsivo as in the image.

I’ve been trying for two days <label>nome campo</label> always spoils the positioning of the fields.

I’m trying to do something like in the attached image.IMAGEM EXEMPLO

  • 2

    Hello, enter the code of what you have tried so far. If you want, the bootstrap documentation has an example inline form for you: http://getbootstrap.com/css/#Forms

  • Follow the code I tried [link] http://www.codeply.com/go/bp/T2EgQDgbx1

  • Fabio, take a look at this example. https://jsfiddle.net/3teg3yL2/ Wouldn’t that be something you’d like? What’s wrong with you exactly?

3 answers

1

There is an example of how to do this in bootstrap documentation

<form class="form-inline">
  <div class="form-group">
    <label for="exampleInputName2">Name</label>
    <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
  </div>
  <div class="form-group">
    <label for="exampleInputEmail2">Email</label>
    <input type="email" class="form-control" id="exampleInputEmail2" placeholder="[email protected]">
  </div>
  <button type="submit" class="btn btn-default">Send invitation</button>
</form>
  • It’s interesting, but the label element is above the text field and I can’t put it in a line type: label field --> label field

  • Have some css in your form besides bootstrap?

  • Erlon Charles only Bootstrap and no more css my problem is being the example Label in the link. The text is above the text field and I need it on the left side of the field. [link] http://www.codeply.com/go/bp/T2EgQDgbx1

  • In the link you sent you are using the class form-horizontal instead of using form-inlinel. working exchange.

0

With the bootstrap library you can do so:

<div class="row">
  <div class="col-md-6">.col-md-6</div>
  <div class="col-md-6">.col-md-6</div>
</div>
  • It did not work, it was below each other. [link] http://www.codeply.com/go/bp/sSRMRGD0sf

  • I have updated the example for the version you are using.

  • This partially solved, now I have a problem with the label element before the input element. I need a linear register. Ex: Name: text field + space + E-mail: text field. The label always stays above the text field, I need beside [link] http://www.codeply.com/go/bp/T2EgQDgbx1

0

Simple form for sending message in contact

 <form method="post"">
                                    <div class="row 50%">
                                        <div class="6u"><input type="text" name="nome" placeholder="Nome" /></div>
                                        <div class="6u"><input type="text" name="email" placeholder="Email" /></div>                                    
                                    </div>
                                    <div class="row 50%">
                                    <div class="12u"><input type="text" name="assunto" placeholder="Assunto" /></div>
                                    </div>
                                    <div class="row 50%">
                                        <div class="12u">
                                            <textarea name="mensagem" placeholder="Mensagem"></textarea>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="12u">
                                            <h2 id="aguarde"  style="display:none;" class="answer_list" >Aguarde...</h2>
                                            <input type="submit" value="Enviar/>                                    
                                        </div>                                  
                                    </div>                                                              
                                </form>

I learned, about bootstrap with an example of super cool websites with HTML5 CSS3 and Bootstrap. FIXING: http://html5up.net/ download an example site and make the party.

  • This one didn’t work either :(

  • http://html5up.net/ This is the site ! great examples for study.

  • I followed the example of this link now I cannot place the text on the left side of the field [link]http://www.codeply.com/go/bp/T2EgQDgbx1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.