为什么我的HTML表单元素在IE8中单击时会四处移动? [英] Why do my HTML form elements move around when clicking on them in IE8?

查看:93
本文介绍了为什么我的HTML表单元素在IE8中单击时会四处移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有一堆输入字段(类型为文本和选择)的HTML表单。我浮动它们,以便每行有两个。在所有浏览器(包括IE7)中,一切正常,但由于IE8中的某些原因,每当我在任何字段或其标签内单击时,该字段或周围的字段会垂直向上或向下移动。一旦我单击该框,该位置将恢复正常,不过随后附近的另一个框可能会移动。另外,并非所有的文本框字段都存在此问题,并且单击同一文本框并不总是会导致此问题。有任何想法吗?

I have an HTML form with a bunch of input fields (of type text and select). I am floating them such that there are two on each row. In all browsers (including IE7), everything works okay, but for some reason in IE8, whenever I click inside any of the fields or their labels, that field or a surrounding one vertically moves up or down. The position then returns to normal once I click away from the box, though then another nearby box might move. Also, not all of the textbox fields have this issue, and clicking the same textbox doesn't always cause this issue. Any ideas?

推荐答案

我遇到了完全相同的问题,要解决此问题,我设置了

I had the exact same problem, and to fix it, I set

display:block

在跳跃并修复它的元素。希望有帮助。

On the element that was jumping around and that fixed it. Hope that helps.

这篇关于为什么我的HTML表单元素在IE8中单击时会四处移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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