tags:

views:

903

answers:

4

When I create an application on my laptop it compiles and renders just fine. If I compile the page and put it on a server to host it, it still renders just fine on multiple computers.

However, if I transfer the code to my desktop and run it on my desktop the size of all the fonts is all messed up. Everything is MUCH bigger. As you can probably guess, this messes up my layout considerably.

On the desktop machine I am using the GWT browswer...

Any ideas on why the same code would render differently on two different machines?

If I compile the code on the desktop and put it on a server it looks like the laptop version (small).

Essentially I have this:

Laptop
   Hosted: small
   Server: small

Desktop
   Hosted: large
   Server: small

I have checked this against IE, firefox and safari.

Why does hosted mode look different?

Thanks!

A: 

It is something to do with the Browser you used, the Browser on your desktop may have large font as preference set. Try restore default settings of that browser or try with other browsers.

codemeit
I would tend to think this would be the case, but I am simply using the GWT browser.
Hortitude
+1  A: 

Because you have different default font sizes and/or monitor dpi settings on the two machines?

AIUI the GWT standard styles just sets font size to "small", which will be relative to the default font size set in the browser. Either set the fonts to a measurement in pixels or, better, use a more liquid layout that can cope with a range of font sizes.

bobince
Stole my suggestion. I once searched for problems with IE font sizes only to find it was the dpi setting on the Display control panel.
Kieveli
A: 

The GWT Debug browser uses the native browser on your machine (so IE on Windows, Safari on Mac, Firefox on Linux).

It's not a GWT issue, but some fonts look different in different browsers (even at the same size and style). You need to find a font and size that looks nice across all the browsers you want to support, and then set that as a css style for your text.

rustyshelf
Except when I compile my application on the large machine and it renders find in IE, firefox and Chrome.
Hortitude
what OS do you run?
rustyshelf
Have you CSS styled your text, or are you just relying on the built in styles? I've never seen this problem, but then our text is always styled with either an em or px size.
rustyshelf
I have not anything at all with the CSS. One thing that I did notice is that when I compile the output and put it on a server, and then hit the server with the Hosted browser the output is still incorrect. This makes me think that the Hosted browser is simply using a different set of rules.
Hortitude
A: 

I'm doing a project in GWT as well and am getting hit by this as well and here's my take....

[rant]

This whole html, css, javascript ball wasnt just randomly dropped...the m*tha f*cka was dropped from the f*ck*ng space station. You'd think with all the self proclaimed brainiacs out there working on this stuff there'd be a solution by now. There's a million frameworks out there that help avoid putting together a big slop but the fact is that spaghetti nightname started long ago and is beyond clean up and it's called html/javascript.

There's no browser standards. Some sites support only IE, and I'll get that box that says "Sorry, you must use IE" and then the neighbors have to hear me curse cause what are you supposed to do if you don't run Windows?
[/rant]