cancel
Showing results for 
Search instead for 
Did you mean: 

CSS and background image

N/A

CSS and background image

I'm sure I am missing something really silly here. This is a website I'm building simply as a college project ( http://www.alanmackenzie.plus.com ) and if you view source you will see that there is supposed to be a fixed background image on each page as defined by the CSS in the Head portion. The image is definitely on the server.....am I missing something really silly ??

Thanks in advance Cheesy
7 REPLIES
Community Veteran
Posts: 6,983
Thanks: 8
Registered: 10-04-2007

CSS and background image

Just a coding problem I think.

The coder on my site is BACKGROUND="commonpics/back.gif"

whereas the code on your site is background-image:url(/image_web/background.jpg)
N/A

CSS and background image

Thanks for your reply Smiley

Unfortunately, tried that and it didn't work. The original coding shows up great in Dreamweaver, it's only when it gets online it doesn't work.....i've tried all the obvious like checking the pic is in the right directory but still no joy :?
Community Veteran
Posts: 6,983
Thanks: 8
Registered: 10-04-2007

CSS and background image

What happens if you remove the "body {" and "}" tags from the html code ?
N/A

CSS and background image

Nope Sad doesn't show in either then
pjemmanuel
Grafter
Posts: 349
Registered: 05-04-2007

Re: CSS and background image

Quote
The image is definitely on the server.....am I missing something really silly ??


Have you tried setting all the features in a single line, such as: -
background:  url('/image_web/background.jpg') no-repeat fixed bottom;
N/A

CSS and background image

It doesnt work as the image is corrupt or missing or the wrong case.

if you goto
http://www.alanmackenzie.plus.com/image_web/background.jpg

you should see the image but you cant see it it gives an error says it cant be displayed due to erros.

Upload the iamage again and test in the browsers first
N/A

CSS and background image

Thank you all for your assistance. I've played around and played around and nothing was correcting it. I then had the bright idea that maybe the code doesn't like the folder "image_web".....so I changed it to "imageweb".....ie without the underline, and lo and behold it worked. Bloody weird if you ask me :roll: