I have a resources folder on the webapp root. I placed a CSS file named screen.css
under resources->login->css
and images to be used in styles available in the CSS file are placed unded resources->login->css->images
as can be seen in the following picture.
Therefore, an image should be accessible from styles available in the screen.css
CSS file as follows.
background: url(images/login_bg.jpg) no-repeat top center;
I set the url
attribute everywhere in the screen.css
file but no images from the images
folder are available to the browser.
What is missing here?
I have done it using the following resource evaluation expression.
background: url("#{resource['login:css/images/login_bg.jpg']}") no-repeat top center;
But why does giving the url
attribute a path relative to the given CSS file screen.css
does not work in the first case.