Friday, January 29, 2016

Re: background image on panel in GWT


.desktopPanel{
    background-image: url("\cti\gwtdemo\client\images\intelview-bkground.jpg");
    background-color: lightgray;

}

Your image url must point to a valid URL when your app is deployed. I am pretty sure that images inside your java src folder are not available to the browser once deployed. You need to put your images either into "Web Pages/images" so they are part of your deployment or create a folder "cti/gwtdemo/public/images" and put them into that folder. GWT will copy all files in the "public" folder to the module output folder and thus should be available when your .war file will be deployed.

Also with CSS you usually use forward slashes in url().

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment