LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 329 users online 221836 members 155 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
radshelb
Music: http://www.last.fm/user/missmiseryy
Mood: Bored
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
4 online / 11 MPM
Fresh Topics
  LiveWire / Technical Forums / Web Design & Search Engine Optimization / Viewing Topic

CSS (Seperate Backgrounds??)
HALP
Replies: 7Last Post July 2 7:11am by JamesBrauman
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( awesome10 )


Wealthy Hobo
Reply
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?

-------
FREE LOCKERZ.COM INVITES - 100% FREE


6:44 am on July 2, 2009 | Joined: Jan. 2009 | Days Active: 195
Join to learn more about awesome10 Australia | Asexual Male | Posts: 1,513 | Points: 4,787
LiveWire Humor
JamesBrauman


Connoisseur
Reply
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.

7:00 am on July 2, 2009 | Joined: Nov. 2005 | Days Active: 202
Join to learn more about JamesBrauman Australia | Straight Male | Posts: 5,770 | Points: 7,652
JamesBrauman


Connoisseur
Reply
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;
}


7:03 am on July 2, 2009 | Joined: Nov. 2005 | Days Active: 202
Join to learn more about JamesBrauman Australia | Straight Male | Posts: 5,770 | Points: 7,652
Narfled the Garthok


Visionary
Reply
Dude above gave you all the css you need :P

Post edited at 7:05 am on July 2, 2009 by Narfled the Garthok

-------
I love dick


7:04 am on July 2, 2009 | Joined: Sep. 2008 | Days Active: 292
Join to learn more about Narfled the Garthok Virginia, United States | Straight Male | Posts: 5,910 | Points: 8,462
JamesBrauman


Connoisseur
Reply
Sorry if that doesnt make sense I'm a bit high.

7:04 am on July 2, 2009 | Joined: Nov. 2005 | Days Active: 202
Join to learn more about JamesBrauman Australia | Straight Male | Posts: 5,770 | Points: 7,652
JamesBrauman


Connoisseur
Reply
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.

7:06 am on July 2, 2009 | Joined: Nov. 2005 | Days Active: 202
Join to learn more about JamesBrauman Australia | Straight Male | Posts: 5,770 | Points: 7,652
( awesome10 )


Wealthy Hobo
Reply
Thanks man! ill try it out and get back to you =]

-------
FREE LOCKERZ.COM INVITES - 100% FREE

7:07 am on July 2, 2009 | Joined: Jan. 2009 | Days Active: 195
Join to learn more about awesome10 Australia | Asexual Male | Posts: 1,513 | Points: 4,787
JamesBrauman


Connoisseur
Reply
No problems

7:11 am on July 2, 2009 | Joined: Nov. 2005 | Days Active: 202
Join to learn more about JamesBrauman Australia | Straight Male | Posts: 5,770 | Points: 7,652
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Web Design & Search Engine Optimization / Viewing Topic