This is literally killing me. All sorts of ulcers over this and can’t figure it out. I have a div of content that i want to set a background image to. I can not for the life of me get it to display. I can change the colors just fine so i know i’m working within the correct parameters…or so i think. here’s the css:
Another note: Are there certain criteria to be able to shorthand? I’ve even copied examples straight off sites and will not get it to work correctly, but if I list this way above, which is actually the way I prefer for my own sanity, it will not work either. It would just be nice to know why. Obviously a new css user and am loving every bit of it. should have learned this a long time ago. Thanks for your help!!
I just downloaded your example exactly and substituted in my own image for bgimage.jpg, and it worked. Tested it in both IE6 and Firefox 3. Random things you may want to check for:
– Is the path to the image correct? Maybe you made a typo in the name of the image file?
– Do you have an ad blocker installed? I spent an hour once trying to figure out why I couldn’t get a certain image to show up on a page, even though I was 100% positive I had the path correct, and could even browse directly to it…turned out that it had "ad" in the filename and this was causing my ad blocker to hide it
– Does this problem happen on both your local computer and on the server, or just one or the other? Maybe your code is correct but you forgot to upload the image, for example
As an aside, you have two <html> tags, and your two background properties can be combined into one. But I left your code as-is and it worked for me, so neither of those things is causing this.
Thanks for all your help and quick responses. I did manage to get it to work….everything (html, css, and image) were all in the same folder to begin with but nevertheless I ended up just saving everything in a seperate folder again and it started working. got to love it.
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".