1
votes

I need to load an image from a stylesheet (site.css).

The background image has to come in the html,body tags:

html, body
{
    background-image:url('../Themes/myTheme/Content/Images/test.jpg');
    background-repeat:repeat-y;
    background-position:center center; /*horizontal, vertical*/
}

I have tried several variations but for some reason Orchard will not load my image?

(Already using the same approach on a MVC4 project, now I am converting the layout to Orchard.)

Edit: Firebug gives the following CSS bug: Failed to load the given URL.

1
Use your browser's "inspect element" view to see what the final URL is that the browser is trying to load. - Pekka
There is nowhere any mention of any image anywhere in firebug. - PeterP
so, the issue is the css is not getting applied, not the image is not being loaded then? - box86rowh
Firebug gives the following error: "Failed to load the given URL". Not really sure how to give the proper path in then, it seems to be different in Orchard. - PeterP

1 Answers

1
votes

I have solved my problem but the internal working of Orchard is still not clear to me on the subject...

Moved my image map from Content to Styles, followed by the following css:

background-image:url('images/background.jpg');

Anyone know why Orchard does not accept a other location then Styles/images ?

Thanks.