Html Rails和Bootstrap3:如何在同一行中获得名字和姓氏?

Html Rails和Bootstrap3:如何在同一行中获得名字和姓氏?,html,ruby-on-rails,twitter-bootstrap-3,Html,Ruby On Rails,Twitter Bootstrap 3,我一直无法在同一行中获得名字和姓氏字段,并且是其他行宽度的一半-电子邮件、密码等 我尝试了各种更改,包括添加“form horizonal”,col-xs-6,但没有解决它 我想让这口井看起来像这样(目前井的尺寸都一样,叠在一起): index.html.erb的摘录: <form class="form-signin col-sm-4 well" role="form"> <h2 class="form-signin-heading">Sign U

我一直无法在同一行中获得名字和姓氏字段,并且是其他行宽度的一半-电子邮件、密码等

我尝试了各种更改,包括添加“form horizonal”,col-xs-6,但没有解决它

我想让这口井看起来像这样(目前井的尺寸都一样,叠在一起):

index.html.erb的摘录:

<form class="form-signin col-sm-4 well" role="form">
          <h2 class="form-signin-heading">Sign Up</h2><hr>

          <form class="form-inline" role="form">

            <form class="form-horizontal">
            <div class="form-group col-xs-6">
              <label class="sr-only" for="#">First name</label>
              <input type="text" class="form-control" id="#" placeholder="First name">
            </div>
            </form>

            <form class="form-horizontal">
            <div class="form-group col-xs-6">
              <label class="sr-only" for="#">Last name</label>
              <input type="text" class="form-control" id="#" placeholder="Last name">
            </div>
            </form>


            <div class="form-group">
              <input type="email" class="form-control" placeholder="Email address">
            </div>

            <div class="form-group">
              <input type="email" class="form-control" placeholder="Type email again">
            </div>

            <div class="form-group">
              <input type="password" class="form-control" placeholder="Password">
            </div>

             <div class="form-group">
                <div class="">
                  <div class="checkbox">
                    <label>
                      <input type="checkbox"> Remember me
                    </label>
                  </div>
                </div>
              </div>

            <button class="btn btn-lg btn-primary btn-block" type="submit">Sign Up</button>
          </form>
        </form>

注册
名字 姓 记得我吗 注册
非常感谢大家的帮助

完整index.html.erb-

Bootstrap 3网格概述(是的,我也看过):

我看了另一个相关的问题,但没有解决:


我急忙补充说,解决方案可能会有所不同,因为它是自举的。我的解决方案根本没有考虑到这一点,因为我对它不熟悉。这可能和改变一些课程一样简单。祝你好运…

在你想要的外观图片中,没有名字和姓氏的标签。您希望您的文档中没有标签吗?@lennon625,如果您指的是类似于
的内容,那么除了占位符之外没有其他内容也可以。我只需要占位符,让人们知道在哪里放置的名称等。权利。我现在正在制作小提琴,但对于初学者来说,请删除这两个输入的标签(名字:),否则它将无法按照您希望的方式排列。在这之后,只需给名字和姓氏输入一个id,这样就可以使用CSS将它们作为目标,并将它们浮动到左侧。我马上给你拿把小提琴,让你知道该怎么做。