|
The code is a pretty simple one. You need to wrap your whole site in a, what's now called, a wrapper (or container) div.
Here is what you HTML will look like with the added wrapper div
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en-US"> <head> <title>Some title</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <div id="wrapper"> <div id="content">Some content in here</div> <div id="sidebar">Some sidebar stuff in here</div> </div> </body> </html>
The CSS that makes the magic happen is apply auto to the margin property
#wrapper { margin: 0 auto; width: 780px; background-color: #900; }
|