I have an MVC4 project that has the following structure:
/Content/css/sprites/topbar.css
/Content/images/topbar.png
In the css file, I am trying to reference an image using:
background: url('../../images/topbar.png')
But the image is not displayed. If I change it so that the image is in:
/Content/css/sprites/topbar.png
And change the css as follows:
background: url('content/css/sprites/topbar.png')
it works, but it violates my project structure.
Any ideas?
EDIT
I didn’t mention anything else since I didn’t think it mattered, however it seems to affect it!
@System.Web.Optimization.Styles.Render("~/MainStyles") css, , , . , ?