繁体   English   中英

Twitter引导程序未正确显示

[英]Twitter bootstrap not displaying right

所以我正在寻找这个: http : //twitter.github.com/bootstrap/base-css.html#forms内联表单.form-inline

现在在我的页面上,输入看起来像没有填充的连线:

实时示例:此处: http : //jsbin.com/ariret/1/edit

这是我的代码:

      <div class="navbar">
        <div class="navbar-inner">
          <form class="form-inline" action="<?php echo $this->baseUrl('login'); ?>" id="form-login" method="post">
            <input type="text" class="input-small" id="email" name="email-login" placeholder="<?=$this->translate('Email');?>">
            <input type="password" class="input-small" id="password" name="password-login"  placeholder="<?=$this->translate('Password');?>">
            <label class="checkbox">
              <input type="checkbox" name="keep-logged" value="1" id="check-logged"> <?=$this->translate('Remember me'); ?>
            </label>
            <input type="hidden" name="login_type" value="normal" />
            <button type="submit" class="btn"><?=$this->translate('Login');?></button>
          </form>
        </div><!-- end navbar-iner -->
      </div><!-- end navbar -->

这是它的样子:

在此处输入图片说明
它必须具有与登录按钮相同的高度。 我的页面上包含css和js文件!

这似乎是Bootstrap的JSbin错误。 其他测试站点(和本地主机)显示此功能可以正常工作。

Bootstrap将输入字段的高度设置为20px,但尚未应用。 答案尚不清楚,但是您始终可以转到https://github.com/remy/jsbin/issues/new并提交新的Issue。

它的高度必须与登录按钮的高度相同。我的页面中包含css和js文件!

<button type="submit" class="btn btn-primary btn-mini">login</button>

会将按钮的高度减小到(几乎)输入的高度

如果要增加输入的高度以使按钮对齐,建议您在本地覆盖CSS

<style type="text/css">
.form-inline .input-small {
  height: 30px;
  margin-top: 3px;
}
</style>

两者的“解决方案”工作在jsbin例子- http://jsbin.com/ariret/4/edit

您可以创建以下方式:

Jsfiddle Working内联引导表格

在浏览器中的结果Jsfiddle在浏览器中

<div class="navbar">
        <div class="navbar-inner">
            <div class="container-fluid">
                <div class="nav row-fluid">

                        <form class="form-inline pull-right">
                            <input type="text" placeholder="email or username" />
                            <input type="password" placeholder="password" />
                            <label class="checkbox">
          <input type="checkbox" name="keep-logged" value="1" id="check-logged"> <?=$this->translate('Remember me'); ?>
        </label>
        <input type="hidden" name="login_type" value="normal" />
                            <button type="submit" class="btn">login</button>
                        </form>

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM