Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在IE中使用渐变包装背景将内容DIV居中?_Html_Css_Internet Explorer - Fatal编程技术网

Html 如何在IE中使用渐变包装背景将内容DIV居中?

Html 如何在IE中使用渐变包装背景将内容DIV居中?,html,css,internet-explorer,Html,Css,Internet Explorer,它适用于Firefox、Safari和Chrome,但不适用于IE和右边距:自动请帮忙 这是链接 这是我的CSS * { padding: 0px; margin: 0px; } .wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -250px; background: #aad3d9; /* old browsers */ background: -moz-linear-gra

它适用于Firefox、Safari和Chrome,但不适用于IE
右边距:自动请帮忙

这是链接

这是我的CSS

* {
padding: 0px;
margin: 0px;
}

.wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -250px;
background: #aad3d9; /* old browsers */
background: -moz-linear-gradient(top, #80BCC5 0%, #ffffff 100%); /* firefox */

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#80BCC5), color-stop(100%,#ffffff)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#80BCC5', endColorstr='#ffffff',GradientType=0 ); /* ie */ } /* corresponds to height of #footer */

#body-wrapper {
height: 100%;
width: 100%;
}

#header {
width: 960px;
margin-left:auto;
margin-right:auto;
}

#header img {
padding-top: 15px;
}

#header p{
color: #784f78;
font-size: 15px;
font-family: Arial, Arial, Helvetica, sans-serif;
font-weight:bold;
text-align:right;
margin-top: -33px;
line-height:90%
}

使文本对齐:居中;到父元素,并在元素本身中将其设置回左侧

#body-wrapper { text-align: center }
.wrapper { text-align: left }

使文本对齐:居中;到父元素,并在元素本身中将其设置回左侧

#body-wrapper { text-align: center }
.wrapper { text-align: left }

祝贺你。你的IE现在处于怪癖模式。在怪癖模式下,IE的行为类似于IE5.5,因此它不支持
margin:0auto
。尝试删除
之前的注释,因为
之前的注释会导致IE使用怪癖模式。


祝贺你。你的IE现在处于怪癖模式。在怪癖模式下,IE的行为类似于IE5.5,因此它不支持
margin:0auto
。尝试删除
之前的注释,因为
之前的注释会导致IE使用怪癖模式。

也不要写入宽度:100%到divs。这没用(你加了填充物,它就坏了)。它自动填充可用空间,因此从不写入宽度:100%到divs。这没用(你加了填充物,它就坏了)。它自动填充可用空间