3 replies [Last post]
danakalinin
Offline
newbie
http://www.to-the-sky.com
Last seen: 16 years 28 weeks ago
http://www.to-the-sky.com
Joined: 2004-03-14
Posts: 4
Points: 0

I hope I am posting in the right place! Hi all...

Ok, so I am trying to get a layout up, where I have one picture (about 500x550 pixels) that I need displayed as the bg in the lower right hand corner, with no tiling in any direction. The bgcolor, I need to be dark blue. So, I write the code:

body {
margin: 0px 0px 0px 0px;
background image: url('snowflakes2.jpg') bottom right no-repeat fixed
}

with the bgcolor specified in the body tag. This doesnt work, when you go to the site, the bg image shows up, in the right place, but the bgcolor is white and only shows up blue if you hit refresh. So, I change the code to:

body {
margin: 0px 0px 0px 0px;
background image: url('snowflakes2.jpg') bottom right no-repeat fixed background color #261E46 }

and take the bgcolor out of the body tag. This is even stranger, as the bgcolor for me shows up green! You can se this at my site: http://siberia.mircx.com/new/ (hit enter to see the erroneous page)

I have been going insane over this and have tried many many many variations to no avail, can anyone help me?? I would so much appreciate it! thanks!!!

~Dana

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 23 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

bg color overriding bg image and vice versa

Your shorthand CSS is pretty messed up that's why. You need:

body 
	{
	margin: 0; 
	background: url(snowflakes2.jpg) #261E46 bottom right no-repeat fixed;
	}

The next sentence is true. The previous sentence is false. Discuss...

danakalinin
Offline
newbie
http://www.to-the-sky.com
Last seen: 16 years 28 weeks ago
http://www.to-the-sky.com
Joined: 2004-03-14
Posts: 4
Points: 0

bg color overriding bg image and vice versa

thanks so much! Yeah the code that you saw was after I had messed with the orig after about 50 times, originally i had it much closer but then I went insane... thankyou so much tho!!

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 23 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

bg color overriding bg image and vice versa

Just realised as well, add:

padding: 0;

... to the body CSS above. Different browsers use either margin or padding, so it's best to zero both.

The next sentence is true. The previous sentence is false. Discuss...