IE8 - 兼容模式展开页面输出

发布于 2024-10-08 14:50:49 字数 236 浏览 0 评论 0原文

我有一个主要用 HTML 编写的网页。当我从 Visual Studio 2008 运行我的网站时,页面看起来很好。问题是当我发布它时IE8的兼容模式将页面展开。

在我的页面曾经展开之前,因为表格中有很多隐藏单元格,这些单元格具有单元格间距和填充。但我解决了所有这些问题。当我关闭兼容模式时,它看起来很棒。

我似乎认为这是因为我有一些隐藏的标签仍然占用空间但没有显示。但我不确定。

对此有什么通用的解决方案吗?

I have a web page that i have written in mainly HTML. When I run my website from visual studio 2008 the page looks fine. The problem is when I publish it IE8's compatibility mode spreads the page out.

BEfore my page used to be spread out because I had alot of hidden cells in tables that had cell spacing and padding. But I fixed all of that. And it looks great when I turn compatibility mode off.

I seem to think it's because I have some labels that are hidden that are still taking up space but not being shown. I am not sure though.

Are there any common solutions to this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里梦着梦中梦 2024-10-15 14:50:49

最好的解决方案是通过强制 IE8 坚持 IE8 模式来阻止兼容模式:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

您再也不用担心 IE7 兼容模式带来的灾难了。

The best solution is to prevent compatibility mode by forcing IE8 to stick to IE8 mode:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

You'll never need to worry about the disaster that is IE7-compatibility mode again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文