Forum Moderators: not2easy
BODY { text-align: center; }
DIV#pagewrapper {
text-align: left; /* To revert to normal text alignment within DIV
width: 500px; /* Smaller than clientwidth
border: 1px solid black; /* So I can see where it is */
}<body>
<div id='pagewrapper'>
Some text
</div>
</body>
In IE 6 & 7 fine, the DIV is centered and the text is left. In FF The DIV stays left.
BODY { text-align: center; }
DIV#pagewrapper {
text-align: left;
margin: 0 auto;
width: 500px;
border: 1px solid black;
}
I don't care about IE5
#pagewrapper { margin: 0 auto; } I'm feeling generous
body { text-align: center; }
#pagewrapper { text-align: left; margin: 0 auto; }