I've been trying to centrally position my site pages in IE6 but despite using what seems to be the correct and accepted code (though perhaps not as the case may be), in IE6 the site pages keep aligning left.
In IE7/8, FF etc. the alignment is centered and fine.
The
CSS I'm using is:
/* global to standardise padding etc. */
* {
padding:0;
margin:0;
border:0;
line-height:0;
}
body {
margin: 0;
padding: 0;
text-align: center;
background: #ffffff;
font-family:Arial, Helvetica, sans-serif;
overflow:auto;
height:100%;
}
#container {
width: 1002px;
background: #ffffff;
margin: 0 auto;
text-align: left;
height:auto;
}
This
CSS works fine (in IE6) on another site, i.e centers ok.
Some articles talk about IE6 being funny with
XHTML doctypes, so I swapped it for an
HTML Transitional doctype- but that wouldn't work either.
Any ideas as to how I can make the site centered properly in IE6? As far as I can tell the above code should work- but doesn't...