Firefox 忽略了我的 margin-bottom CSS 属性。在 Chrome 中运行良好。
我的代码很简单:
<input type="button" value="Continue Shopping" onClick="history.back(-1);" class="btn btn-orange pull-right mr10" style="margin-bottom:10px;">
发生的情况是“继续购物”按钮覆盖了产品表。 http://rsatestamls.kaliocommerce.com/cart.aspx
最佳答案
正如前面提到的答案,您在 button
上指定了 pull-right
,它使元素向右浮动并将其从 DOM 中分离出来。您可以指定提到的内联样式 clear:both;
,或者您可以走另一条路。
因为您已经在使用 Bootstrap,您可以使用 div.row
元素包装您的 .btn
元素,该元素已经包含 clear:both;
规则。
bootstrap CSS 具有以下指定:
.row:after { clear:both; }
所以,像这样:
<div class="row">
<a href="http://rsatestamls.kaliocommerce.com/checkout.aspx"><input type="submit" class="btn btn-orange pull-right" value="CheckOut"></a>
<input type="button" style="margin-bottom:10px;" class="btn btn-orange pull-right mr10" onclick="history.back(-1);" value="Continue Shopping">
</div>
关于html - Firefox 忽略了我的 margin-bottom CSS 属性。在 Chrome 中运行良好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18663826/