Using this code: <body style="margin:0; background-color: #9f9f9f"> <table width="768" border="0" cellspacing="0" cellpadding="3" bgcolor="#ffffff" align="center"> Code (markup): I get a white sheet centered on a gray background. How do I achieve the same effect using CSS? Thanks in advance.
I'm not sure I completely understand what you're saying but I think you mean how do you transform that into CSS. In your CSS file or in the header of your site, whatever you use for styling, you would put.. body { margin:0; background-color: #9f9f9f; } Code (markup): As for the table which you shouldn't use unless you're displaying data.. you just define an id or class for the table like: <table id="whateverhere" width="768" cellpadding="0" cellspacing="0"> Code (markup): Then in your CSS put #whateverhere { background-color: #ffffff; margin: 0 auto; } Code (markup): I think that's how you center a table. Hope this helps.
Thanks, Caden. Your solution did the trick. BODY { background-color: #9f9f9f; margin: 0; } .wrapper { width: 760px; margin: 0 auto; border: 0; padding: 0; background-color: #FFFFFF; } Code (markup):