Reputation: 359
The following is the screen shot of the project structure , please guide me how to specify the image path url
body {
background-image: url(../WebContent/css/Expenses2.jpg);
}
On giving the above path the jpg file does not come as the background colour.
Upvotes: 0
Views: 6307
Reputation: 371
Simply remove the ... from the url, with ... you are switching to an parent folder
body {
background-image: url(/WebContent/css/Expenses2.jpg);
}
Or
body {
background-image: url(css/Expenses2.jpg);
}
Upvotes: 1
Reputation: 4125
Given that the css
folder is in the same folder as your expenses.jsp file you should just be able to do
css/Expenses2.jpg
So
body {
background-image: url(css/Expenses2.jpg);
}
Upvotes: 1