Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
147 views
in Technique[技术] by (71.8m points)

some background images in css don't load

I've just uploaded a website from my computer to a remote server.

everything was working on my local machine, and works on the remote server - aside from 1 background image!

all images are in the same directory, with same permissions. just the 'Main-Header-graphic.jpg' doesn't work. I have this in my CSS:

/* this works */
#top_header #logo {
float: left;
background: url(../img/Logo.png) no-repeat;
width: 403px;
height: 52px;
text-indent: -9999px;
}

/* this doesn't! 
   if i replace the "../img/Main-Header-graphic.jpg" below with another image, eg.
   the "../img/Logo.png" above, it works! */
#middle_header {
margin-top: 10px;
height: 280px;
background: url(../img/Main-Header-graphic.jpg) no-repeat;
}

so as you see the paths to images are all the same, and work in the same format with all the other background images. Just the middle_header background doesn't work! any ideas?

thanks, Patrick

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Only thing I can think of is that it might be something wrong with the image itself. Try opening the image in Photoshop, and if you can, save it to another format - or as a .jpg with some different compression settings. Then re-upload and see if it works.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...