CSS horizontal centering, and min-height not working in IE
<div id="wrapper">
<div id="content" style="background-color: white;">
...
</div>
</div>
#content{
float: left;
width: 540px;
padding: 30px 30px 0px 30px;
background-color:#19252f;
开发者_如何学Gotext-align: left;
min-height: 500px;
}
#wrapper {
margin: 0 auto;
width: 800px;
}
Firefox look
Internet Explorer 8 lookmargin:auto horizontal centering is not supported in IE6. Instead you can either use absolute positioning to center or you can do
body{ text-align:center; }
For IE min-height you need to add the hacked property
_height: 300px
in addition tomin-height: 300px;
All browsers but IE will ignore the hacked property, and since IE effectively treats height as min-height, you’ll get the effect that you want in all browsers.background-color
works in IE without any problems.
精彩评论