边框:没有在IE8中工作但不在IE7中工作? [英] Border: none works in IE8 but not IE7?

查看:97
本文介绍了边框:没有在IE8中工作但不在IE7中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有1px填充的文本输入,我有时会放置1个px边框。我希望所有文本输入都填充相同的垂直空间,边框与否。为了实现这一点,我创建了一个没有边框,但像你一样填充空间类带边框:无和2px填充:

I have text inputs with 1px padding that I sometimes put 1 px borders on. I want all text inputs to fill the same vertical space, borders or not. To achieve that, I created a "don't have borders, but fill space like you do" class with border: none and 2px of padding:

.BorderInputNone {
 border: none;
 padding: 2px;
}

这在IE8中有效,但在IE7中,输入周围有明显的边框。

This worked in IE8, but in IE7, there were visible borders around the input.

编辑:我使用border修复它:透明。

.BorderInputNone {
border: 1px solid transparent;
padding: 1px;
}


推荐答案

我用边框修复它:透明。

I fixed it by using border: transparent.

.BorderInputNone {
border: 1px solid transparent;
padding: 1px;
}

这篇关于边框:没有在IE8中工作但不在IE7中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆