html - 如何更改登录表单的形状?帐户输入和 meteor

标签 html css meteor accounts

我试图将我的登录表单全部放在一行中,左边是电子邮件,右边是密码,右边是提交按钮。现在它看起来像这样:

enter image description here

我怎样才能使整个表格都在一行中,并以“忘记密码?”开头在最左边,然后是电子邮件,然后是密码,然后是最右边的登录按钮?这是代码:

<template name='entrySignIn'>
  <div class="container">
    <div class="row">
      {{#if logo}}
        <div class="entry-logo">
            <a href="/"><img src="{{logo}}" alt="logo"></a>
        </div>
      {{/if}}
      <div class="entry-sign-in">
        {{#if otherLoginServices}}
        <div class="entry-social">
          {{#each loginServices}}
            {{> entrySocial}}
          {{/each}}
          {{#if passwordLoginService}}
          <div class="email-option">
            <strong class="line-thru or-sign-in">{{i18n "OR"}}</strong>
          </div>
          {{/if}}
        </div>
        {{/if}}
        {{> entryError}}
        {{#unless otherLoginServices}}
        {{/unless}}
        {{#if passwordLoginService}}
          <form class="entry-form" id='signIn'>
            <div class="form-group">
              <input autofocus name="email" type="{{emailInputType}}" class="form-control" value='{{email}}' placeholder="{{emailPlaceholder}}">
            </div>
            <div class="form-group">
              <input name="password" type="password" class="form-control" value='{{password}}' placeholder="{{i18n 'password'}}">
            </div>
            <p><a href="/forgot-password">{{i18n "forgotPassword"}}</a></p>
            <button type="submit" class="submit btn btn-success">{{i18n "signIn"}}</button>
          </form>
        {{/if}}

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

我尝试了 jason 的建议,它有点奏效,但现在看起来像这样:

enter image description here

有人知道如何解决这个问题吗?

最佳答案

这看起来像 Bootstrap 。如果是,请尝试使用此处找到的表单内联类 http://getbootstrap.com/css/#forms-inline

<form class="entry-form form-inline" id='signIn'>
            <div class="form-group">
              <input autofocus name="email" type="{{emailInputType}}" class="form-control" value='{{email}}' placeholder="{{emailPlaceholder}}">
            </div>
            <div class="form-group">
              <input name="password" type="password" class="form-control" value='{{password}}' placeholder="{{i18n 'password'}}">
            </div>
            <p><a href="/forgot-password">{{i18n "forgotPassword"}}</a></p>
            <button type="submit" class="submit btn btn-success">{{i18n "signIn"}}</button>
          </form>

关于html - 如何更改登录表单的形状?帐户输入和 meteor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22259176/

相关文章:

html - 避免失去对选择的关注

jquery - 修复了滚动时标题最终位于页面中间的问题(三星 Galaxy s3)

javascript - 是否可以在 Meteor 中写入 settings.json?

meteor - 如何获取 Meteor 中的可用发布列表

javascript - 使用 javascript 访问 CDATA 中的特定元素

jquery - 使用 jQuery 的悬停问题

html - 即使在 HTML 字符串中提供完全限定的 URL 后也无法应用外部 CSS

javascript - 多次加载同一页面时,PHP 页面内容从缓存加载

html - CSS值可以相对改变吗?

javascript - Meteor 在 mongodb 数据库上获得双重插入