LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 647 users online 223701 members 823 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
Prince o palities
Peeves: Teenagers.
Mood: Carefree
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
7 online / 20 MPM
Fresh Topics
  LiveWire / Technical Forums / Web Design & Search Engine Optimization / Adding Reply

Quoting Post
Topic CSS (Seperate Backgrounds??)
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
awesome10 Posted at 6:44 am on July 2, 2009
Okay so i've got a website and i have the body aligned in the center to 1000px. How can i make the 1000px body background colour be one colour and then the two empty spaces on both sides of it to be another colour?

Here is a picture of what my website is like:

|C2|  C1  |C2|
|C2|  C1  |C2|
|C2|  C1  |C2|

C1 = Body (aligned to 1000px), I want the background colour of this to be White.

C2 = blank spaces on sides of the body, i want this to be black.

How can i do this? is there any css code for this?

Replies
JamesBrauman Posted at 7:11 am on July 2, 2009
No problems
awesome10 Posted at 7:07 am on July 2, 2009
Thanks man! ill try it out and get back to you =]
JamesBrauman Posted at 7:06 am on July 2, 2009
Quote: from Narfled the Garthok at 7:04 am on July 2, 2009

Dude above gave you all the css you need :P

I'm an awesome dude.
JamesBrauman Posted at 7:04 am on July 2, 2009
Sorry if that doesnt make sense I'm a bit high.
Narfled the Garthok Posted at 7:04 am on July 2, 2009
Dude above gave you all the css you need :P
JamesBrauman Posted at 7:03 am on July 2, 2009
So your html would look like this:
Code:

<html>
 <head></head
 <body>
   <div id="container">
   ...
   </div>
 </body>
</html>

And your css would look like this:
Code:

body {
 background: black;
}

#container {
 width: 1000px;
 margin: 0 auto;
 height: 1000px;  // For example purposes
 background: white;
}

JamesBrauman Posted at 7:00 am on July 2, 2009
Don't do that at all, you're not supposed to align the body. What you need are div's. Div's are basically containing blocks, used all throughout CSS. Like everywhere. I'll write you some sample code hold on, stay on lol.
All 7 previous replies displayed.