咨询个php中div css的问题,先谢了、想要4列5行,为啥弄出来就是1列20行呢,我的Css定位哪里错了,请各位指点。
演示地址:http://goleft.cn/taotop/category1.php?catid=50000697
代码:<div class="productlist">
<?php
foreach ($taobaokeItem as $mtwitem) {
header('Content-type: text/html; charset=utf-8');
echo "
<div class=\"productlist_box productlist_box_l\">
<dl>
<dt>
<P class=\"productlist_photo\"><a href=\"goods.php?nick=".urlencode($mtwitem['nick'])."&aid=".$mtwitem['iid']."\" target=\"_blank\"><img src=\"".$mtwitem['pic_url']."_160x160.jpg\" alt=\"".$mtwitem['title']."\" width=\"160\" height=\"160\" /></a></P>
<P class=\"productlist_price\"><SPAN class=\"price\"><b>".$mtwitem['price']."</b>元 </SPAN></P>
<P class=\"productlist_commit\"><SPAN 
class=\"sellnum\">月销:".$mtwitem['commission_num']."件</SPAN><SPAN class=\"shop\"><a href=\"shopurl.php?aid=".urlencode($mtwitem['nick'])."\" target=\"_blank\"><IMG src=\"1_files/toshop.gif\"/> </A></SPAN> </P>
<P class=\"productlist_name\"><a href=\"goods.php?nick=".urlencode($mtwitem['nick'])."&aid=".$mtwitem['iid']."\" target=\"_blank\">".$mtwitem['title']."</a></P></dt></dl><div class=\"clear\"></div></div>";
}
?></div>
以下是Css
/*productlist*/
.productlist {width:748px; margin:3px auto; border:1px #ccc solid;}
.productlist_page { line-height:30px; height:30px; border-bottom:1px #ccc solid; background:url(../img/productlist_page.gif) repeat-x;}
.productlist_box { width:747px; margin:8px auto; float:left;}
.productlist_box dl { width:185px; margin:0 auto; float:left; text-align:center;}
.productlist_box dl dt { width:185x; margin:0 auto; margin-bottom:10px; height:270px; overflow:hidden;}
/*.productlist_box dl dt:hover { background:#FDF79E; border:1px #ff6600 solid;}*/
.productlist_box dl dt p { margin:3px auto; margin-bottom:0; width:160px; color:#666;}
.productlist_box dl dt p a { color:#404040;}
.productlist_box .productlist_photo { width:166px; height:166px; margin:4px auto; border:1px #ccc solid;}
.productlist_box .productlist_photo img { margin:3px;}
.productlist_box .productlist_name { width:166px; line-height:18px; height:36px; overflow:hidden; text-align:left;}
.productlist_box .productlist_name a { color:#3366cc;}
.productlist_box .productlist_price { width:166px; height:24px; line-height:24px;}
.productlist_box .productlist_price .price { float:left; width:135px; display:block; text-align:left;}
.productlist_box .productlist_price .price b { color:#ff6600; font-size:15px;}
.productlist_box .productlist_price .credit { float:right; width:90px; display:block; text-align:right;}
.productlist_box .productlist_commit { width:166px; height:24px; line-height:24px;}
.productlist_box .productlist_commit .xb-truth { width:88px; float:left; text-align:left; display:block;}
.productlist_box .productlist_commit .xb-truth img { margin-right:4px;}
.productlist_box .productlist_commit .sellnum { width:78px; float:left; text-align:left; display:block;}
.productlist_box .productlist_commit .sellnum b { color:#CC9900;}
.productlist_box .productlist_commit .shop { display:block; float:right; width:88px; text-align:right;}
哪里出问题了啊