Firefox, Safari 및 Chrome에서는 작동하지만 IE에서는 작동하지 않습니다. 주어진 width
다음 시도 margin-left:auto;
및 margin-right:auto;
도와주세요.IE에서 그래디언트 래퍼 백그라운드로 콘텐츠 DIV를 센터링하는 방법은 무엇입니까?
여기 http://www.ellenselbiedesign.com/public/testing/index.html
여기 텍스트 정렬을주고 내 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%
}
도 div : 100 %를 쓰지 않습니다. 그것은 좋지 않습니다 (즉, 패딩을 추가하면 중단됩니다). 자동으로 사용 가능한 공간을 채 웁니다. – mreq