我试图将以下Bootstrap按钮放在同一水平线上:
<a class="btn btn-success btn-lg checkout" href="/foo/buy">
<i class="glyphicon glyphicon-shopping-cart"></i> $50.00
</a>
<form action="/subscriptions" accept-charset="UTF-8" method="post">
<div class="btn-group">
<button class="btn btn-default btn-lg" type="submit">
<i class="glyphicon glyphicon-eye-open"></i> Watch
</button>
<a class="btn btn-default btn-lg" href="/foo/watchers">
<span>1</span>
</a>
</div>
</form>
<form action="/wishlists" accept-charset="UTF-8" method="post">
<div class="btn-group">
<button class="btn btn-default btn-lg" type="submit">
<i class="glyphicon glyphicon-gift"></i> Add to wishlist
</button>
<a class="btn btn-default btn-lg" href="/foo/wishlists">
<span>1</span>
</a>
</div>
</form>
我尝试使用.form-horizontal
和.form-inline
类进行添加(虽然我怀疑这些是用于表单内部样式),以及正在执行display: inline
,但可以&# 39;似乎让它发挥作用(我对CSS不好)。
答案 0 :(得分:1)
添加
style="float:left; width: auto"
到表单选择器