Reputation: 413
I have a directory like this in Eclipse:
SimpleServletProject
webontent
>> images
sep2.jpg
etc.
>> css
>> MetaINF
>> WebINF
index.html
login.html
The images and CSS are two folders where the images and CSS files are kept. In the CSS folder I have a login.css file.
I want to give the path of the image which is in images folder. The css code is:
background-image:url("/images/sep2.jpg");
What should be the path?
Upvotes: 0
Views: 3834
Reputation: 171
Please try following in your css file. This should work for you.
background-image: url("../images/sep2.jpg");
Upvotes: 1
Reputation: 13
Try to use background: url("/images/sep2.jpg");
instead. That should give you the correct path for your project. Otherwise we need some more code to identify the problem
Upvotes: 0