title: Spring CSS image loading
body: <p>I am using Spring <em>3.0.7</em> for my web application. I want to load an image from my resource location in a CSS file like this:</p>
  
  <pre><code>.tag {
      background: transparent url(/resources/img/bg.gif) no-repeat;
      background-position: 0 50%;
      padding-left: 50px
  }
  </code></pre>
  
  <p>I can easily load my static resource in jsp file as shown below without any issues:</p>
  
  <pre><code>&lt;c:url value="/resources/css/main.css" /&gt;
  </code></pre>
  
  <p>My static resource handler has been configured as shown below:</p>
  
  <pre><code>&lt;mvc:resources mapping="/resources/**" location="/web-resources/"/&gt;
  </code></pre>
  
  <p>As said ealier, I can load resources in jsp files without an issue, but cannot get the image to load in my CSS. Can anyone help load the image in the CSS file!</p>