Reputation:
I am using the following css rule:
background: url("http://example.com/background.jpg");
It is not working and I suppose it is because referring to external servers is not supported. Is this true? If so, what kind of workaround I might use?
Not sure if it's relevant, but I need this inline. Testing right now on JSFiddle.
Upvotes: 8
Views: 38148
Reputation: 9131
There may be 2 reasons why your background is not working
Otherwise, your background: url("http://example.com/background.jpg");
is Correct
Upvotes: 10
Reputation: 21
I'm not sure if this was resolved or not but I had a similar problem and I found a simple solution. First off, I used background-image instead of background. Second, I made sure to include the full url. So instead of background: url("http://example.com/background.jpg"); I would put background-image: url("http://www.example.com/background.jpg");
Upvotes: 2