You could determine what css file to use by checking window's width and
height.
For example:
You have a css file for every resolution you want to manage. In those
files you declare the same css rules, with the same base names + some
unique identifier (eg: .topMenu800x600 or topMenu1024x768).
Then you write a helper function that will determine the css rule name
in base of window's dimensions like this:
public String getCSSName(String baseName){
if(800x600){
return baseName + "800x600";
}
.
.
.
}
After that you will use the helper function to add the css rules that
depend on the client's resolution (eg.
vPanel.addStyleName(CSSHelper.getCssName("mainTopVPanel");).
P.S.: What about writing some elastic css with percentual sizes? You
could set a fixed size main parent that will change it's dimensions
every time the browser window gets resized (have a look at
Window.onResize) and all child elements will have percentual dimensions...
On 12/14/2009 10:19 AM, Šobis wrote:
> Hello,
>
> I have a question about using multi CSS in on GWT project.
>
> I have different clients (different resolution) and I would like to
> set one CSS file to one resolution and another to different one. Is
> there any way to do that.
>
> For example, for resolution 1280x800 I would like client to use
> Project1280x800.css, for 1400x1050 Project1400x1050.css and so on... I
> hope you understand what would I like to do.
>
> Thanks for answers.
>
> Matej
>
> --
>
> 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.
>
>
>
>
--
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.