View previous topic :: View next topic |
Author |
Message |
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Fri Feb 03, 2006 10:26 am Post subject: Background Color |
|
|
I am trying to get a background color with CSS to go all the way to the bottom of the screen.
When I use this:
Quote: |
#main
{
background: red;
width: 700px;
}
|
It only goes down to the bottom of my menu. I want it to fill the whole screen background with red. How can I do this? _________________ I shine |
|
Back to top |
|
|
x-raysteve
Joined: 01 Feb 2006 Posts: 53
|
Posted: Sat Feb 04, 2006 5:05 am Post subject: |
|
|
One way I have seen people do this is just to use an appropriate background image, and then repeat it. This way it will fill the whole screen.
A background color will only fill the area used by the actual class. |
|
Back to top |
|
|
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Sat Feb 04, 2006 12:31 pm Post subject: |
|
|
Okay. I will try and look that up. I know how to do a background image but am not sure how to repeat it in CSS.
Do you have an example? _________________ I shine |
|
Back to top |
|
|
x-raysteve
Joined: 01 Feb 2006 Posts: 53
|
Posted: Sat Feb 04, 2006 6:12 pm Post subject: |
|
|
You could do something like this:
Quote: |
body {
background-image: url(../images/bgblue.jpg);
background-repeat: repeat;
height: 100%;
}
|
Just make sure your background image is the color you want your background to be. |
|
Back to top |
|
|
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Sat Feb 04, 2006 11:23 pm Post subject: |
|
|
Much gracias. I was not sure on the repeat command. Are there are other options if you just want a vertical repeat?
Anyways I just tested this with a different image and it seems to work. Now I need to make one the right color. Do you think this goes any slower? _________________ I shine |
|
Back to top |
|
|
Missie
Joined: 06 Feb 2006 Posts: 25
|
Posted: Mon Feb 06, 2006 7:26 pm Post subject: |
|
|
I was having the same problem on one of my sites the other day, and I racked my brain to figure it out. And I ended up just leaving it and going to bed (I had been up most of the night). Then I popped in here and say this! Thanks for the info! This will be like a life saver. Know maybe my site will look cool for a change. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|