Why do div tags render differently in IE8 and Firefox?
为什么div标签在IE8和Firefox中呈现不同?
Is there a way to have them rendered the same?
有没有办法让它们呈现相同?
This is a very general question, the reason I ask is I am fighting both browsers when using div tags, some elements are not rendering the same.
这是一个非常普遍的问题,我问的原因是我在使用div标签时对抗两个浏览器,有些元素的呈现方式不同。
1 个解决方案
#1
You may benefit from starting off with a reset.css. This generally fixes any differences between multiple browsers. I suggest Meyer's (online at http://meyerweb.com/eric/tools/css/reset/).
您可以从使用reset.css开始受益。这通常可以修复多个浏览器之间的差异。我建议迈耶(在线http://meyerweb.com/eric/tools/css/reset/)。
Simply download that .css file, and reference it first before any other css rules/files. This assumes that your problem is with the actual browsers, and not with your markup.
只需下载.css文件,并在任何其他css规则/文件之前首先引用它。这假设您的问题出在实际的浏览器上,而不是您的标记。
#1
You may benefit from starting off with a reset.css. This generally fixes any differences between multiple browsers. I suggest Meyer's (online at http://meyerweb.com/eric/tools/css/reset/).
您可以从使用reset.css开始受益。这通常可以修复多个浏览器之间的差异。我建议迈耶(在线http://meyerweb.com/eric/tools/css/reset/)。
Simply download that .css file, and reference it first before any other css rules/files. This assumes that your problem is with the actual browsers, and not with your markup.
只需下载.css文件,并在任何其他css规则/文件之前首先引用它。这假设您的问题出在实际的浏览器上,而不是您的标记。