I have MVC 3 application.
In one of div’s I set background-image.
#wrapper {
width: 960px;
margin: 0px auto;
background: url(../../Content/images/img01.jpg) no-repeat center top;
}
In _Layout.cshtml I write this:
<div class="wrapper">
<!-- Some Items -->
</div>
But image is not showed. If I write this:
<img src="../../Content/images/img01.jpg"/>
Html-page show this image correct.
Why this image is not setted on backgroun of div?
wrapper is a class.
You have defined the CSS as # which is an ID
EDIT:
Just so it makes sense your code must be: