2007-11-08

input style兼容IE6的方案

关键字: input style IE6
FF与IE7下input type="text" 和 input type="password"输入框的长度都是一样的,但在IE6下偏偏前面的长后面的短2px,设置size也不行,而设置width可以,但为了不影响其他input(如type=submit)的width,我们可以这样写css:
input[type="text"], input[type="password"] {
	width: 200px;
}

input {
	width: expression((this.type=="text" || this.type=="password") ? "200px" : "style");
}

前面的写法是照顾FF,后面的写法是照顾IE,唉,郁闷!
评论
发表评论

您还没有登录,请登录后发表评论

hideto
搜索本博客
我的相册
A6bdc31c-c66e-468e-961e-9cc721e82adc-thumb
screenshot
共 1 张
存档
最新评论