M MD Websunlimited Aug 31, 2006 #4 Using a DIV <body> <div id="content"> Content </div> </body> Then the style body { background-color: #ccd3d9; color: #000000; text-align: center; } #content { width: 630px; margin-left: auto; margin-rignt: auto; border: 2px solid #A6B2BC; color: #000000; padding: 0 20px 0 20px; text-align: left; }
Using a DIV <body> <div id="content"> Content </div> </body> Then the style body { background-color: #ccd3d9; color: #000000; text-align: center; } #content { width: 630px; margin-left: auto; margin-rignt: auto; border: 2px solid #A6B2BC; color: #000000; padding: 0 20px 0 20px; text-align: left; }
M Murray Aug 31, 2006 #5 Won't work if there are any absolutely positioned elements in the page. In that case you'd need to make the div#content "position:relative". Also, this - > margin-rignt: auto; should be this - > margin-right: auto; 8)
Won't work if there are any absolutely positioned elements in the page. In that case you'd need to make the div#content "position:relative". Also, this - > margin-rignt: auto; should be this - > margin-right: auto; 8)