大家帮帮忙,一个分类显示问题

2016-07-07 15:06 来源:www.chinab4c.com 作者:ecshop专家

因为是做手机的,名字都比较短,我想显示成 2排的模式。一排显示有点空的感觉,那位指点下,CSS附带上了,谢谢了

/*商品分类*/
#category_tree{border:4px solid #f1faff; background-color:#fff;}
#category_tree dl{margin:6px;}
#category_tree dt{background:url(images/lineBg.gif) repeat-x left bottom;
color:#3f3f3f;padding:2px 0 3px 12px;
}
#category_tree dt a{background:url(images/bg.gif) no-repeat 0 -69px;
color:#3f3f3f; padding-left:15px; text-decoration:none;
}
#category_tree dd{padding:3px 0 3px 10px;}
#category_tree dd a{color:#404040; text-decoration:none;}
#category_tree dd a:hover{color:#ff6600; text-decoration:none;}

回答:

http://www.kf518.com/bbs/viewthread.php?tid=1


在css文件中找到商品分类代码,用下面的替换
/*商品分类*/
#category_tree{border:4px solid #ffeef6; background-color:#fff;}
#category_tree dl{margin:6px;}
#category_tree dt{background:url(images/lineBg.gif) repeat-x left bottom;
color:#3f3f3f;padding:2px 0 3px 12px; width:150px;
}
#category_tree dt a{background:url(images/bg.gif) no-repeat 0 -69px;
color:#3f3f3f; padding-left:15px; text-decoration:none;
}
#category_tree dd{padding:3px 0 3px 10px; width:70px; float:left;
white-space:nowrap;
word-break:keep-all;
display: inline;
}
#category_tree dd a{color:#404040; text-decoration:none;}
#category_tree dd a:hover{color:#ff6600; text-decoration:none;}




在lbi文件中找到category_tree.lbi,用下面的代码全部替换
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<div class="box">
<div class="box_1">
<div id="category_tree">
<!--{foreach from=$categories item=cat}-->
<dl>
<dt><a href="{$cat.url}" ><font color=#ff9966><b>

{$cat.name|escape:html}</b></font></a></dt>
<!--{foreach from=$cat.children item=child}-->
<dd><a href="{$child.url}">[{$child.name|escape:html}]

</a></dd>
<!--{/foreach}-->

</dl>
<!--{/foreach}-->
<dt><div align="center">诚信经营.服务客户</div></dt>
</div>
</div>
</div>
<div class="blank5"></div>


太感谢了