ECShop 网上商店系统支持论坛's Archiver

huchaopeng 发表于 2008-9-19 09:59

帮我解决下谢谢了 离成功不远闹.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
// JavaScript Document

startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</script>

<style type="text/css">
<!--
body {
  font: normal 11px verdana;
  }

ul {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 150px; /* Width of Menu Items */
  border-bottom: 1px solid #ccc;
  }
   
ul li {
  position: relative;
  }
   
li ul {
  position: absolute;
  left: 149px; /* Set 1px less than menu width */
  top: 0;
  display: none;
  }

/* Styles for Menu Items */
ul li a {
  display: block;
  text-decoration: none;
  color: #777;
  background: #fff; /* IE6 Bug */
  padding: 5px;
  border: 1px solid #ccc; /* IE6 Bug */
  border-bottom: 0;
  }
   
/* Holly Hack. IE Requirement \*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */

li:hover ul, li.over ul { display: block; } /* The magic */
-->
</style>
</head>

<body>
<ul id="nav">
    <!--{foreach from=$categories item=cat}-->
<li><a href="{$cat.url}">{$cat.name|escape:html}</a>  
<ul>
          <!--{foreach from=$cat.children item=child}-->  
<li><a href="{$child.url}">{$child.name|escape:html}</a></li>
       <!--{/foreach}-->  
</ul>
       <!--{/foreach}-->  
</li>

</ul>  
</body>
</html>

代码我改成这样了可是问题就出来了
[img]http://bbs.ecshop.com/images/Picnicker/attachimg.gif[/img][/i]

[i][attach]15151[/attach][/i]
[i]效果是出来了可是中间导航应该是横着的怎么变竖了....[/i]

[i][attach]15152[/attach][/i]
[i]还有每当打开一个小分类

应该出现那一个大分类  怎么现在只显示那个大分类下面的小分类都不显示闹...

求解决..



[i]我改的是category_tree.lbi这个文件[/i]
[/i]

可乐猪 发表于 2008-9-19 10:15

应该是这里

li ul {
  position: absolute;
  left: 149px; /* Set 1px less than menu width */
  top: 0;
  display: none;
  }
这个宽度

huchaopeng 发表于 2008-9-19 10:26

应该怎么改呢????????????????

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.