WebCheez Posted May 29, 2011 Share Posted May 29, 2011 The following displays no image: body { background-color: #000000; background-image: url('code.gif'); background-repeat:no-repeat; } I made sure that code.gif exists, so what's going on here?? Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted May 29, 2011 Share Posted May 29, 2011 it looks valid, But the point is, where is that image? in the same folder as the style sheet? We can't see the context here. So if you have an online example i am pretty sure to find the problem. it could also be: background-image: url('../code.gif'); or background-image: url('../images/code.gif'); Quote Link to comment Share on other sites More sharing options...
floridaflatlander Posted May 29, 2011 Share Posted May 29, 2011 double check your image path. The way it is now, it should be in the same folder as the file whose body your trying to style with the above code Quote Link to comment Share on other sites More sharing options...
WebCheez Posted May 29, 2011 Author Share Posted May 29, 2011 Oh, looks like the .gif extension was capitalized so it was .GIF. I got it to work. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted May 29, 2011 Share Posted May 29, 2011 nice one, you might also want to consider writing shorthand css body{ background:#000 url(code.gif) no-repeat; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.