html中ul的3像素怎么解决,【IE6的疯狂之六】li在IE中底部3像素的BUG(增加浮动解决问题)...

今天开发项目中碰到一个li在IE中的BUG,先来看设计原型(如图:)

c200878125057.jpg

两个红色中间是

1px的底边框;

我写的代码如下:

=============================================================

-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>

无标题文档

body,dl,dt,dd,ul,ol,li,pre,form,fieldset,input,p,blockquote,th,td,h1,h2,h3,h4,h4,h5{margin:0;padding:0}

body{font:400 12px/150% Tahoma,SimSun,Arial;color:#333;background-color:#FFFFFF}

select{font-size:12px}

ul,li{list-style:none}

img{border:none}

ul{ border-bottom:#FDD496 2px solid;border-top:#FDD496 2px solid; height:263px}

ul li{ height:43px; border-bottom:#DCDCDC 1px solid; }

.po-txt{ float:left; width:146px; height:31px; background-color:#f00; padding:12px 0 0; font-size:14px; font-weight:700; text-align:right}

–>

???

?????

?????

通行证:

?????

?????

?????

昵称:

?????

?

=================================================================

在IE6,IE7下显示为(如图):貌似

多了个 margin-bottom:3px;

r200878125412.jpg

几经周折,找到了Qzone的鬼哥帮忙解决,他说在

上加float:left;

问题解决了,当然根据设计稿的精神还要加个width:100%;

完整的样式如下:

=====================================================

body,dl,dt,dd,ul,ol,li,pre,form,fieldset,input,p,blockquote,th,td,h1,h2,h3,h4,h4,h5{margin:0;padding:0}

body{font:400 12px/150% Tahoma,SimSun,Arial;color:#333;background-color:#FFFFFF}

select{font-size:12px}

ul,li{list-style:none}

img{border:none}

ul{ border-bottom:#FDD496 2px solid;border-top:#FDD496 2px solid; height:263px}

ul li{ height:43px; border-bottom:#DCDCDC 1px solid; float:left; width:100%;}.po-txt{ float:left; width:146px; height:31px; background-color:#f00; padding:12px 0 0; font-size:14px; font-weight:700; text-align:right}

–>

======================================================

以前我们老是研究清除浮动,想不到今天却用增加浮动来解决问题。呵呵。

?特别感谢Qzone的鬼哥!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值