html - Firefox 忽略了我的 margin-bottom CSS 属性。在 Chrome 中运行良好

标签 html css firefox

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/

相关文章:

javascript - -WEBKIT-TRANSITION 用于显示样式

css - Wordpress wp 队列样式

javascript - 只为 yii2 中的一页创建应用程序集

firefox - Firefox 右键菜单的 class/id 是什么?

firefox - 获取 nsIChannel 请求的 nsIDOMWindow 在 e10s 上总是返回 null

internet-explorer - IE 条件注释和 Chrome/Firefox

javascript - 将复选框添加到动态添加的表格行

ruby-on-rails - Ruby on Rails 用于 Web 应用程序,Django 用于网页?

javascript - div类所应用的span id如何循环?

javascript - 使用两个选择器选择一个元素