|
Here's how you do it:
Your html on the homepage would look like this.
<body class="home"> <div id="wrapper"> Content goes here </div> </body> </html>
The CSS for the homepage would look like this:
body.home { margin: 0 auto; background: #FFFFFF ; width: 785px; }
So your homepage has a nice crisp white background to it!
To change the background on another page to have an image!
I want my portfolio page to have a blue patterned background. To accomplish this here is what you do.
The HTML for the portfolio page would look like this.
<body class="home"> <div id="wrapper"> Content goes here </div> </body> </html>
The CSS looks like this:
body.home { margin: 0 auto; background: url('bluepattern.gif') repeat 0px 0px; width: 785px; }
By assigning a class to each <body> you now have the freedom to custom style each page background!
Enjoy!
|