【问题标题】:How to align horizontally a group of buttons如何水平对齐一组按钮
【发布时间】:2015-07-03 16:08:36
【问题描述】:

结果

<div class="btn-group">
        <button class="btn btn-default pull-left" type="submit"><i class="glyphicon glyphicon-search"></i> Search</button>

        <div class="divider"></div>

        <div>
            @Html.ActionLink("Reset filters", "Index",
    null,
    new { @class = "btn btn-success custom pull-left", @style = "color:white", @role = "button" }
    )
        </div>

        <button class="btn btn-default custom pull-right" type="submit"><i class="glyphicon glyphicon-file"></i> Export to Excel</button>

    </div>

这是

我错过了什么? 我想要左边的两个第一个按钮和右边的导出按钮(水平对齐)。

.divider{
    width:20px;
    height:auto;
    display:inline-block;
}
.custom {
    width: 160px !important;
}

编辑:我的意思是水平的

【问题讨论】:

标签: html css model-view-controller twitter-bootstrap-3


【解决方案1】:

您可能缺少应该处理它的引导样式表,请查看它是否已加载。 或者使用类似这样的样式并测试它是否有效:.pull-right {float:right}

【讨论】:

  • 我的意思是横向的。然而,图像中的结果相同。我为我的错误道歉。
猜你喜欢
  • 2016-04-07
  • 1970-01-01
  • 2020-10-08
  • 2014-03-17
  • 2017-03-09
  • 2014-04-20
  • 2012-08-31
  • 2014-07-27
  • 2016-02-20
相关资源
最近更新 更多