0

When ClientBundle created, images from bundle are represent on page as inline data (for ex. img src="data:image/gif;base64,R0lGODlh.... ) in FF, CH. Images are assigned to background so "background-position" attributes works fine. As usually, MS IE makes problems. Instead of embedding image, IE creates image map/texture atlas/image cache (not so sure about the name) so "background-position" can't be used. Is there any way to disable creation of the image cache. Also, is it possible to control data embedding. For long list of for ex. list items generated html is very big as same data is repeated from item to item.

DraganS
  • 2,621
  • 1
  • 27
  • 40

1 Answers1

1

How are you including the images? with @Sprite? Create one @Sprite style with nothing in it but the image. Then create styles for all the rest of the css as separate styles. In the code you can set an element to multiple styles. As for ie, look at using chrome-frame when it is an old version of ie.

Deanna
  • 696
  • 1
  • 5
  • 15
  • @Source("images/spinner.gif") ImageResource spinner(); – DraganS Mar 02 '12 at 15:14
  • Please, could you provide me simple example how to combine css with images or some useful url. Thanks. – DraganS Mar 02 '12 at 15:15
  • 1
    This will create a background image in the css @sprite .myImageStyleName { gwt-image: "myBackgroundImage"; } You reference it like any other cssresource style. – Deanna Mar 02 '12 at 15:18
  • 1
    Using the @Source works if you are loading up gwt Image widgets or background images set in code, but it isn't so good for background images set by css. – Deanna Mar 02 '12 at 15:22
  • @@Deanna I found workaround by using IconHelper.create (gxt) method. Thanks – DraganS Mar 02 '12 at 21:30