<div class="user123content">
<div class="firstDiv">
<div class="secondDiv">
<div class="thirdDiv">
<div style="float: left; width: 171px; text-align: center;">
<div>
<span style="font-weight: bold;">Product</span>
<br>
<br>
<a href="#">
<img height="150" border="0" width="116" alt="Product des" src="img.jpg"></a>
<br>
</div>
<span class="productPrice">
111 $
</span>
<br>
<span></span>
</div>
</div>
<div class="thirdDiv">
<div style="float: left; width: 171px; text-align: center;">
<div>
<span style="font-weight: bold;">Product</span>
<br>
<br>
<a href="#">
<img height="150" border="0" width="116" alt="Product des" src="img.jpg"></a>
<br>
</div>
<span class="productPrice">
111 $
</span>
<br>
<span></span>
</div>
</div>
<div class="thirdDiv">
<div style="float: left; width: 171px; text-align: center;">
<div>
<span style="font-weight: bold;">Product</span>
<br>
<br>
<a href="#">
<img height="150" border="0" width="116" alt="Product des" src="img.jpg"></a>
<br>
</div>
<span class="productPrice">
111 $
</span>
<br>
<span></span>
</div>
</div>
</div>
</div>
</div>
和CSS:
.thirdDiv {
float: left;
width: 176px;
height: 240px;
}
包含所有550 px宽的div
答案 0 :(得分:0)
使用FireBug找出原因。
也许第二次它嵌套在另一个div中,并且有一个样式:
.otherDiv .thirdDiv {
width: 300px; /* override width */
}
答案 1 :(得分:0)
我复制了你的代码并在本地进行了测试,没有问题。所有三个框都显示为水平平铺。我会仔细检查你的css规则是否都没有干扰任何预先插入的Joomla规则或反过来...我在5种不同的浏览器(ie8,chrome,ff,opera,safari)上测试过,同样的每个人的结果。