仿京东三级分类目录出现的问题,希望各位达人帮我看下

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

我的网站为www.sotattoo.com

出现的问题如下

1、鼠标移动二级目录,文字跳动至右侧,想保持在原位
2、二级目录出现右对齐,部分文字显示不全,导致出现错位
想保持左对齐,文字全显。

希望各位达人帮我看下

感激不尽。。。

回答:
补充.CSS为
/*==========================*/




.my_left_category{
width:192px;
font-size:12px;

}


.my_left_category h1{

background:url(images/title.gif);
height:30px;

background-repeat:no-repeat;
font-size:14px;
font-weight:bold;
padding-left:55px;
padding-top:8px;
margin:10px;
color:fff;
}

.my_left_category .my_left_cat_list{
width:192px;
border-color:#fff000;
border-style:solid;
border-width:1px 1px 1px 1px;
line-height:0px;
}
.my_left_category .my_left_cat_list h2 {
margin:1px;
padding:3px 5px 0px 9px;

}
.my_left_category .my_left_cat_list h2 a{
color:#ffffff;
font-weight:bold;
font-size:13px;
line-height:40px;

}

.my_left_category .h2_cat{
width:192px;
height:24px;
background-image:url(images/my_menubg.gif);
background-repeat:no-repeat;
line-height:19px;
font-weight:normal;
color:#fff;
position:relative;
}

.my_left_category a{
font:12px;
text-decoration:none;
color:#ff0000;
}
.my_left_category a:hover{
text-decoration:underline;
color:#000000;
}

.my_left_category h3{
margin:0px;
padding:0px;
height:26px;
font-size:11px;
font-weight:normal;
display:block;
padding-right:0px;
}
.my_left_category h3 span{color:#000000; width:145px; float:right;}
.my_left_category h3 a{ line-height:19px;}

.my_left_category .h3_cat{
display:none;
width:192px;
position:absolute;
left:194px;
margin-top:-26px;
cursor:auto;
}

.my_left_category .shadow{
position:inherit;
background:url(images/shadow_04.gif) left top;
width:204px;
}

.my_left_category .shadow_border{
position:inherit;
width:200px;
border:0px solid #959595; margin-top:0px;
border-left-width:0px;
background:url(images/shadow_border.gif) no-repeat 0px 21px;
background-color:#ffffff;
margin-bottom:3px
}
.my_left_category .shadow_border ul{margin:0; padding:0; margin-left:15px}
.my_left_category .shadow_border ul li {
list-style:none;
padding-left:10px;
background-image:url(images/my_cat_sub_menu_dot.gif);
background-repeat:no-repeat;
background-position:0px 8px;
float:left;
width:75px;
height:26px;
overflow:hidden;
}

.my_left_category .active_cat{ z-index:99;background-position:0 -25px;cursor:pointer;}
.my_left_category .active_cat h3 { font-weight:bold}
.my_left_category .active_cat h3 span{ display:none;}
.my_left_category .active_cat div{display:block;}

category_tree.lbi 为:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<div class="my_left_category">

<h1>鍟嗗搧鍒嗙被</h1>

<div class="my_left_cat_list">

{assign var="pre_item_level" value=-1}

<!--{foreach from=cat_list(0,0,false,3,false) item=cat}-->

{if $cat.level lt 2 && $pre_item_level gt 0}

</ul></div></div></div></div>

{/if}

{if $cat.level eq 0}

<h2><a href="{$cat.url}">{$cat.name|escape:html|truncate:27}</a></h2>

{elseif $cat.level eq 1}

<div class="h2_cat" onmouseover="this.className='h2_cat active_cat'" onmouseout="this.className='h2_cat'">

<h3><SPAN> - {$cat.cat_desc|escape:html}</SPAN><a href="{$cat.url}">{$cat.name|escape:html}</a></h3>

<div class="h3_cat">

<div class="shadow">

<div class="shadow_border">

<ul>

{else if $cat.level eq 2}

<li><a href="{$cat.url}">{$cat.name|escape:html}</a></li>

{/if}

{assign var="pre_item_level" value=$cat.level}

<!--{/foreach}-->

{if $pre_item_level gt 0}

</ul></div></div></div></div>

{/if}

</div>

</div>