On 5 août, 20:30, Thamizharasu S <[email protected]> wrote:
> Hi,
>
> I have started a new project on GWT. I have some basic question on
> CSS. I have a css file which has been referred directly in the HTML
> file (Main html file for this project)
>
> Now I am trying to have ui binder xml for each view. I want to refer
> the css rules directly in the ui binder xml file. Is it possible?
>
> I don't want to put this css file under the same location of ui binder
> xml file. My css file is placed under the war folder directly.
>
> Can any one help me on this?

Just use the class name from your CSS file, without braces.

<ui:style>
.fromInlineCssResource {
   border: 1px solid red;
}
</ui:style>
<g:HTMLPanel>
  <div class="fromExternalCssFile {style.fromInlineCssResource}">
     FOO
     <g:TextBox addStyleNames="{style.fromInlineCssResource}
fromExternalCssFile" />
     BAR
  </div>
</g:HTMLPanel>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to