- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
http://demo.opencart.com/index.php?route=product/product&product_id=42
如果你使用 firebug,或者 chrome 的 inspect element 并插入这段代码
<div style="background:blue;width:100px;height:100px;float:left;"></div>
<div style="background:green;width:100px;height:100px;float:right;"></div>
<div style="clear:both;"></div>
在 .product-info .right 中,你会得到一个大约 400 像素高度的空白区域。如果我尝试修改我的模板,也会发生同样的情况。
如果我创建一个 html 文档并粘贴相同的代码,它会工作正常
<html>
test<br />
<div style="background:blue;width:100px;height:100px;float:left;"></div>
<div style="background:green;width:100px;height:100px;float:right;"></div>
<div style="clear:both;"></div>
test again
</html>
问题显然出在 opencart 的某个地方,但我找不到。
编辑:如果我把 display:none;在左列上它不会产生间隙,因此左列有问题。
编辑:我自己找到了解决方案。我通过 float 右列来修复 float
.product-info .right {
float:right;
width:470px;
margin:0;
}
最佳答案
你的 HTML 结构应该是这样的
<div class="right">
<div style="overflow: hidden; margin-bottom: 10px;">
<div style="background:blue;width:100px;height:100px;float:left;"></div>
<div style="background:green;width:100px;height:100px;float:right;"></div>
</div>
<div style="" class="description"> <!-- remove the style clear:both -->
<span>Brand:</span> <a href="http://demo.opencart.com/index.php?route=product/manufacturer/product&manufacturer_id=8">Apple</a><br>
<span>Product Code:</span> Product 15<br>
<span>Reward Points:</span> 100<br>
<span>Availability:</span> In Stock
</div>
......
your remaining divs goes here
.....
</div>
屏幕截图:
关于css - opencart 清除 :both generates a gap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9956809/
我在《C 编程语言第二版》中读到了以下代码 /* shellsort: sort v[0] ... v[n-1] into increasing order */ void shellsort(int
如何更改GAP中的当前目录? ?我写道: gap> ChangeDirectoryCurrent("Users/anymuanalifah/Documents") 然后我收到一个错误。如果重要的话,我
我有一个关于列表中漏洞的问题。假设我有以下代码: gap> l:=[2,3,,5]; [ 2, 3,, 5 ] gap> for i in [1..Size(l)] do > Print(l[i],"
例如,当我从命令行启动脚本时,我想了解 GAP 的行为 $ gap mytest.gap 而不是从 GAP 内部调用它 gap> Read("mytest.gap"); 特别是,我试过 suppres
最低工作示例: x:=Indeterminate(Rationals,"x"); f:=Sum([1..1000],i->x^i); PrintTo("~/temp.txt",f); 它打印到 tem
我是 phone gap 的新手。我在 config.xml 中遇到错误。实际上我正在做 paypal 集成。 在 config.xml 中显示未绑定(bind)电话间隙命名空间。 当我运行时显示错误
有没有办法将单个 grid-row-gap 设置为不同于网格其余部分的特定大小? 用例:网格的第一行到第二行的间隙应该小于网格的其余部分,因为它充当标题。 最佳答案 grid-row-gap 和 gr
我有一个包含三个图像和一个文本部分的网格。我有网格的列和行间隙,如果我有所有三个图像,它就可以正常工作。但是,如果缺少任何图像,我仍然会得到缺少的列或行的列或行间隙。如果行或列不存在,是否有任何方法可
上周我一直在尝试解决堆栈溢出问题,但我仍然无法找到可行的解决方案,所以想知道是否有人可以为我提供一些帮助/建议? 数据结构说明 我有下表: 位置表(zz_position),用于保存详细信息职位(职位
当我玩入门练习“在 native Android 应用程序中使用 Worklight API”时,我无法从 native Android 页面连接到 Worklight 服务器,错误消息如下: Una
在计算 Tibshirani 的差距统计量时,引用分布中是否有推荐数量的模拟数据集 (B)? B=50? B=100? B=500? B=1000?如果是这样,有什么好的引用资料提到它吗? 最佳答案
我有一个 php 数组(通过表单中的复选框值获得 - 如您所知,复选框仅在未设置时显示在 _POST 变量中)。 Array ( [2] => 0,2 [3] => 0,3 ) 我需要
我正在尝试通过使用辅助表来填补使用组后的空白,你能帮忙吗? 处理没有订单的日子的辅助表 date quantity 2014-01-01 0 2014-01-02 0 2014-01
我试图通过使用辅助表来填补使用组后的空白,你能帮忙吗? 用于处理无订单天数的辅助表 date quantity 2014-01-01 0 2014-01-02 0 2014-01-0
你能告诉我如何去除红线和导航栏之间的白色间隙吗?CSS: /* Main */ #menu{ width: 100%; margin: 0; padding: 10px 0 0 0;
所以我创建了一个导航栏,并且它可以与水平导航一起使用。然而,我在导航栏之间有这些“间隙”,如下图所示,但我仍然可以在这些间隙之间单击。 这是 JSFiddle(SCSS 不起作用,所以我使用编译后的
在下面的 jsfiddle 中,我在第 2 行和第 3 行之间有一个空隙,我猜这是由于 CSS,但我不确定它为什么存在以及如何摆脱它。 如果我将第二行移到最后一行,间隙就会消失,但我想保持当前的行顺序
我创建了这个网站: https://jsfiddle.net/1pvk13o8/ 我正在使用 jquery masonry,一切似乎都很好,但有些行之间有空白或空洞,有什么帮助吗?我希望一切都按应有的
我有一个如下表,其中 X 列是给定开始和结束期间的商品价格。 X START_DATE END_DATE ------------------------------ 1 0
这个问题在这里已经有了答案: pandas or python equivalent of tidyr complete (4 个答案) 关闭 12 个月前。 我在寻找 pandas 数据框中的空白
我是一名优秀的程序员,十分优秀!