用缺省的default模板,商品名称字数超过一行时下方商品被挤走

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

用缺省的default模板,商品名称字数超过一行时下方商品被挤走

如图,左上角的商品,如果品名只有一行的话,就没有问题的

请问这要改css文件吧,要改哪一行呢,我试着调了几次都不行,
附上相应css:
/*精品推荐,新品上市,热卖商品*/
.centerPadd{padding:5px 8px 8px 8px; overflow:hidden;}/*三个大框边框的边框样式*/
.itemTit{height:30px; background:url(images/bg.gif) no-repeat 0px -195px; padding-left:190px; text-align:right;
/*margin-bottom:-3px; _margin-bottom:-2px;*/
}
.itemTit.New{background:url(images/bg.gif) no-repeat 0px -225px;}
.itemTit.Hot{background:url(images/bg.gif) no-repeat 0px -256px;}
.itemTit img{position:relative; top:7px;}
.itemTit h2{float:left; height:27px; background:url(images/itemH2Bg.gif) repeat-x left top; border:1px solid #d6ecff;
font-size:12px; text-align:center; color:#3f3f3f; font-weight:100; padding:0px 10px; line-height:28px; margin:0 6px 0 0;
border-bottom:none; position:relative; bottom:-3px; display:inline; white-space:nowrap;
}
.itemTit h2 a{color:#3f3f3f; text-decoration:none;}
.itemTit .h2bg{height:27px; line-height:28px; border:none; background:none;
font-size:12px; text-align:center; color:#006ace; font-weight:100; padding:0px 10px;
display:inline; white-space:nowrap;
}
.itemTit .h2bg a{color:#006ace; text-decoration:none;}
.centerPadd .goodsBox{border:1px solid #d6ecff; background:#fff; padding:12px 0px 0px 17px; *padding:12px 0px 0px 17px;
_padding:12px 0px 0px 0px;}
.centerPadd .goodsBox .more{text-align:right; clear:both; margin:0 8px 8px 0;}
/*单个商品*/
.goodsItem{width:147px; float:left; position:relative; overflow:hidden; margin:0px 14px 15px 14px;}/*15px是上一行文字与下一行图片距离*/
.goodsItem .goodsimg{width:137px; height:137px; border:4px solid #eef8ff; margin-bottom:4px;}/*4px是图片与品名的距离*/
.goodsItem img{width:52px; height:17px;}
.goodsItem p{text-align:left; color:#3f3f3f;}
.goodsItem p a{color:#3f3f3f; text-decoration:none;}
.goodsItem p a:hover{color:#ff6600; text-decoration:none;}
.goodsItem span{width:40px; height:40px; position:absolute;left:0px; top:0px;}
.goodsItem span.best{background:url(images/bg.gif) no-repeat 0px -304px;}
.goodsItem span.news{background:url(images/bg.gif) no-repeat -75px -304px;}
.goodsItem span.hot{background:url(images/bg.gif) no-repeat -161px -304px;}

回答:
我有将模板默认的缩略图加大至137px,但这应该不会影响吧

自己解决了, .goodsItem{width:147px; float:left; position:relative; overflow:hidden; margin:0px 14px 15px 14px;}在后面增加个高度,height:205px,就可以显示两行字不会出错了