Wednesday, May 30, 2012

Re: How to apply css file to html content within HTML widget?


Any tag in a UiBinder can have a CSS class, but:
  • Native HTML tags like <div> must use their "class" attribute. So <div class="somClass"/>
  • GWT classes, like <g:HTML /> must use the "styleName" attribute, since otherwise there would be a conflict with the Java "class" keyword, so use <g:HTML styleName="someClass"/>
Don't use the CSS filename in these tags.

Include you CSS file via either:
  • <ui:style src="project_entry.css" />  in the top of the UiBinder file OR
  • <stylesheet src=" project_entry.css"/> in your project module file.


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment