问题描述:

I'm having problems linking my image source path in Eclipse's Dynamic Web Project. I have my folders like this:

WebContent

css/

main.css

img/

mainbg.jpg

js/

META-INF/

WEB-INF/

footer.jsp

header.jsp

index.jsp

I was able to link my stylesheet with <link rel="stylesheet" type="text/css" href="css/main.css"> but when I tried linking an image background it doesn't show up. How do I get the right image path? I am very new to Eclipse and Java.

background: url("../img/mainbg.jpg");

相关阅读:
Top