Firefox、Internet Explorer 和 Safari 中的定位不同?
我相信这个问题已经被问过很多次了,而且以前每次出现这个问题时我都设法克服了这个问题。刚才,我觉得它被困住了,无法找到一个合适的解决方案让它在所有浏览器中工作:它只在 Firefox 中正常工作,而在 IE 和 Safari 中,它的元素在某种程度上彼此分离。您可以在此处查看结果: http://img813.imageshack.us/img813/8393/firefox.png http://img812.imageshack.us/img812/8041/10990669.png
这是我使用的代码: http://pastebin.com/n6KEjazp
非常感谢您!
I believe this question has been asked a lot of times, and I have managed to overcome this problem before whenever it occurred. Just now, I feel stuck with it and can't find a proper solution to make it work in all browsers: it does work properly only in Firefox, while in IE and Safari its elements are somehow apart from each other. You can see the result here:
http://img813.imageshack.us/img813/8393/firefox.png
http://img812.imageshack.us/img812/8041/10990669.png
This is the code I use:
http://pastebin.com/n6KEjazp
Thank you very much in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了填充错误(无效的 CSS)之外,其他浏览器计算单元格高度的方式也不同。在 IE 中,高度会添加到填充中。
更改此:
为此:
In addition to the padding misspelling (invalid CSS), those other browsers calculate the cell heights differently. In IE, the height is added to the padding.
Change this:
To this: