删除2px灰色边框环绕边缘IE9 [英] Remove 2px Gray Border Surrounds Edge IE9

查看:94
本文介绍了删除2px灰色边框环绕边缘IE9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对此站点进行编码(尝试使用关键字),并且试图弄清楚如何删除IE9窗口内部(至少顶部,左侧)的阴影2px灰色边框和底部).我的页边距设置为零,因此我所有的页面元素都移到页面的最边缘,但是对于IE9,它们停在此灰色边框处.我没有在HTML中包含任何代码,以使浏览器边缘周围有2px的灰色边框.

I'm trying to code this site (keyword trying) and I'm trying to figure out how to remove this shaded 2px gray border the extends across the the inside of the IE9 window (at least the top, left and bottom). My margins are set to zero, so all my page elements go to the very edge of the page, but with IE9, they stop at this gray border. I have not include any code in my html to have a 2px gray border around the edge of the browser.

我不知道为什么这会在IE9中发生,而且似乎只有我的网页(其他人似乎没有它),但是它弄乱了格式,我真的需要弄清楚如何删除它.

I don't know why this is happening in IE9, and seemingly only my webpage (other ones don't seem to have it), but it's messing up the formatting and I really need to figure out how to remove it.

谢谢!

推荐答案

您没有指定doctype,正如第一行的注释所表明的那样:

You aren't specifying a doctype, as made evident by the comment on the first line:

<!-- Do NOT put any DOCTYPE here unless you want problems in IEs. -->

因此,IE9进入怪异模式".添加适当的文档类型,它应返回标准模式并删除烦人的灰色边框.您可以通过打开开发人员工具(F12)并将文档模式从Quirks Mode更改为IE9标准来测试这是问题.

Because of this, IE9 goes into "quirks mode". Add a proper doc type and it should go back into standards mode and remove the annoying grey borders. You can test this is the issue by opening up the developer tools (F12), and change the document mode from Quirks Mode to IE9 standards.

HTML5文档类型示例:

Example HTML5 doctype:

<!DOCTYPE html>

这篇关于删除2px灰色边框环绕边缘IE9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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