老大帮帮忙..商品分类
我想把商品分类显示为横排的应该在哪里修改呢?我试过CSS 也试过category_tree.lbi 但是还是无法实现.请老大帮帮我呀.!!!!!
[quote]
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<div id="categoryTree">
<h3><div class="title">商品分类</div><div class="r_line"> </div></h3>
<!-- {foreach from=$categories item=cat} -->
<div class="toggleblock">
<h4 class="toggletitle"><!-- {if $cat.children} --><span><img src="../images/icon_list_up.gif" alt="-" /></span><!-- {/if} --><a href="{$cat.url}">{$cat.name|escape:html}</a></h4>
<!-- {if $cat.children} -->
<ul>
<!-- {foreach from=$cat.children item=child} -->
<li><a href="{$child.url}">{$child.name|escape:html}</a></li>
<!-- {/foreach} -->
</ul>
<!-- {/if} -->
</div>
<!-- {/foreach} -->
</div>
<script type="text/javascript">
//<![CDATA[
function getElementsByClassName(id,cls){
var o=document.getElementById(id);
var aelem=[],
oaelem=o.getElementsByTagName("*");
for(var i=0;i<oaelem.length;i++){
if (oaelem[i].className==cls ){
aelem[aelem.length]=oaelem[i];
}
}
return aelem;
}
function slideshow(obj){
obj.parentNode.parentNode.getElementsByTagName("h4")[0].className = "hbg";
obj.parentNode.parentNode.getElementsByTagName("ul")[0].style.display = "";
obj.innerHTML = "<img src='../images/icon_list_up.gif' alt='-' />";
obj.onclick = new Function("slidehidden(this)");
}
function slidehidden(obj){
obj.parentNode.parentNode.getElementsByTagName("h4")[0].className = "hbb";
obj.parentNode.parentNode.getElementsByTagName("ul")[0].style.display = "none";
obj.innerHTML = "<img src='../images/icon_list_down.gif' alt='+' />";
obj.onclick = new Function("slideshow(this)");
}
var a=getElementsByClassName("categoryTree","toggleblock");
for(var n=0;n<a.length;n++){
var olink=a[n].getElementsByTagName("h4")[0].firstChild;
olink.onclick = new Function("slidehidden(this)");
}
//]]>
</script>
[/quote] 高手都冬眠去了。。。 你可以找一个横排的模板,把他相应的地方拷过来.然后再修改成你的
页:
[1]
