HTML:IE:输入文本框中的右边填充 [英] HTML: IE: Right padding in input text box

查看:296
本文介绍了HTML:IE:输入文本框中的右边填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前往 http://jsfiddle.net/srLQH/ ,然后填入输入文字方块

Go to http://jsfiddle.net/srLQH/ and fill in the input text box in the "Result" view.

如果您在FF,Chrome和Safari中执行此操作,文字将会在右侧停止20像素。

If you do this in FF, Chrome, and Safari, your text will stop 20px short of the right side.

在IE 7/8中,文本不会停止20px短 - 它一直到输入框的边缘。

In IE 7/8, the text does not stop 20px short--it goes all the way to the edge of the input box.

什么是IE的处理?如何在IE中获得与所有其他浏览器都一样的填充效果?

What's the deal with IE? How can I get the same padding effect in IE that all the other browsers give me?

推荐答案

解决这个问题。一个同事找到了一个解决方案,我们测试它,它的工作完美。所以事情是删除 padding:right 并添加 border:20px solid transparent

I have been looking for a way to solve this. A colleague found a solution and we tested it and it works perfectly. So the thing is to remove the padding: right and add a border: 20px solid transparent.

这篇关于HTML:IE:输入文本框中的右边填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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