...

View Full Version : Need help to put image as background. NOW SORTED.



effpeetee
10-04-2007, 08:41 PM
I am trying to put a background image on to my site page. So far I have had no luck. Any help would be welcome.

Frank

url below.

_Aerospace_Eng_
10-04-2007, 08:43 PM
And the code you've tried is what?

effpeetee
10-04-2007, 08:43 PM
body
{
background-image:
url('bgdesert.jpg')
}

_Aerospace_Eng_
10-04-2007, 08:50 PM
It should work. Try this

body {
background:#222 url(bgdesert.jpg);
font-family: Arial, Helvetica, sans-serif;
color: white;
font-weight: bold;
margin: 20px 0;
}
Don't use quotes because some browsers may not understand them though most modern browsers do. Some Mac browsers don't. Can't name any off the top of my head at the moment.

effpeetee
10-04-2007, 08:58 PM
Thank you Aero.

I have put it in the code but still no joy.
I have probably messed up somewhere else.

New code on site.

Frank

_Aerospace_Eng_
10-04-2007, 09:00 PM
It helps if you actually "upload" the image. I get a 404 not found error on the your background image location.

effpeetee
10-04-2007, 09:01 PM
It works for me Aero.

Frank

_Aerospace_Eng_
10-04-2007, 09:05 PM
Yes the site does but NOT the image url. According to your css the background image should be here

http://www.exitfegs.co.uk/177.jpg

but its not.

effpeetee
10-04-2007, 09:11 PM
Sorry.

Should be http://www.exitfegs.co.uk/img177.jpg

Frank

_Aerospace_Eng_
10-04-2007, 09:12 PM
I don't think you are understanding me. The URL to your IMAGE is NOT VALID. THERE is NO image at that location. This is WHY your background image is NOT showing up. This is your current code


body {
background:#222 url(177.jpg);
font-family: Arial, Helvetica, sans-serif;
color: white;
font-weight: bold;
margin: 20px 0;
}

If you did this it would probably work

body {
background:#222 url(100.jpg);
font-family: Arial, Helvetica, sans-serif;
color: white;
font-weight: bold;
margin: 20px 0;
}

177.jpg is NOT a valid url to an image.

effpeetee
10-04-2007, 09:20 PM
Should be http://www.exitfegs.co.uk/img177.jpg

Did you not notice the change I had made. It was a typo earlier, I left off the img.

It shows for me.

Sorry for the hassle, but I had previously tried several jpg's here with no luck.

Frank.

_Aerospace_Eng_
10-04-2007, 09:21 PM
You still need to fix it on your site. Its not correct.

effpeetee
10-04-2007, 09:25 PM
I have just clicked it and the picture showed up immediately.
Something strange.

http://www.exitfegs.co.uk/img177.jpg

Frank

EDIT: I think that my trouble this afternoon was that I was leaving the img prefix off the file name.

Most of my images are just numbers but a few have the prefix 'img'
Sorry to have caused you so much trouble but very grateful indeed just the same.

Many thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum