INDRESH KHANDELWAL INDRESH KHANDELWAL - 6 months ago 26
HTML Question

Image not loading in chrome but works fine in eclipse inbuilt browser

I am building a dynamic web application using eclipse javaEE . I am adding a background image to a jsp page by body tag attribute background().When I run this program in eclipse inbuilt browser image loads completely fine but when I run the same program on chrome , background image doesn't load.
Please help in rectifying this problem.
Thanks in advance.

Answer

Try using in your css file

body {
    background-image: url("<image>");

}

or add as inline to body tag

style="background-image: url("image");"

Hope this is helpful for you.