li在ie6 、ie7里莫名其妙的出现几px的margin

可能因为li里放有绝对定位的div 和浮动标签的缘故,li在ie6和ie7里 底部出现几像素的mqrgin值,郁闷老久!后来加上下面两句才搞定!

*html .treeUl li{margin-bottom:-4px;}
*+html .treeUl li{margin-bottom:-4px;}

ps:以下是我html和css

.treeUl li{border-bottom:1px solid #8DC73F;height:61px;background:#83C12C; padding-left:12px; position:relative; width:182px;}

.treeUl li .outDiv{background:url(../images/9.gif) no-repeat left center; padding-left:12px; position:absolute; z-index:1000; width:175px; left:12px; top:10px; height:36px;}
.treeUl li.act{ background:#E5771B;}
.treeUl li:hover{ background:#E5771B; border-bottom:#F6C399;}
.treeUl .hideDiv{position:absolute; width:320px; z-index:999; background:#E5771B; border:#F6C399; left:189px; display:none; top:auto;}

.treeUl .hideDiv dl{margin:0 20px 0 15px; padding:6px 0; border-bottom:1px dotted #E4822E;}
.treeUl li:hover .treeUl .hideDiv{ display:block;}
.treeUl .hideDiv dl a{padding-right:5px;}
.treeUl .hideDiv dl dt{font-weight:bold;}

 

<li>
                    <div class="outDiv">
                        <h2><a href="">3G智能手机</a></h2>
                        <p><a href="">IPHONE手机</a>、
                            <a href="">HTC手机</a>、
                            <a href="">三星手机</a>
                        </p>
                    </div>
                    <div class="hideDiv">
                        <dl>
                            <dt>品牌</dt>
                            <dd>
                                <a href="">三星</a>
                                <a href="">智能</a>
                                <a href="">手机</a>
                                <a href="">IPHONE</a>
                                <a href="">三星</a>
                                <a href="">智能</a>
                                <a href="">手机</a>
                                <a href="">IPHONE</a>
                                <a href="">三星</a>
                                <a href="">智能</a>
                                <a href="">手机</a>
                                <a href="">IPHONE</a>
                            </dd>
                        </dl>
                    </div>
                </li>

 

 

转载于:https://www.cnblogs.com/z-uu/archive/2012/09/28/2707861.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值