firefox input boxes are way too large
The default html input box provided by firefox on linux has a width of approximately 226px, whereas most other browsers provide a box between 120 and 150px. This means that input boxes may not fit the space provided by designers for other browser/platform combinations. Firefox on Windows is about 142px and on OS-X about 149px.
This discrepancy also applies to boxes which use the "size=" parameter, as the default box is defined by the html standard to be the same as "size=20" and most browsers adhere to this. So any box which only specifies size will be up to 90% wider than on other browsers. As far as I can see, the size of the box is unaffected by the default font or font size.
Why does Firefox Linux use such a different size to other browsers and even to Firefox on other platforms?
All Replies (14)
Do you mean the address bar? It will take as much space as is available on the toolbar.
No, I mean the html element called input - of type text (or number)
Did everything in your Firefox get bigger in Firefox 38? High DPI display support just arrived for Linux in Firefox 38, so you may be seeing that effect. To test, you could try adjusting the setting for High DPI support, which operates as a global zoom factor:
(1) In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful.
(2) In the filter box, type or paste pix and pause while the list is filtered
(3) The layout.css.devPixelsPerPx preference usually is set to -1.0 which means use the system default. You can change that to 1.0 for 96-dpi dispay and see whether that is what you prefer. And you can increase the size from there in increments, for example, 1.1 for a global "110%" zoom.
Please be careful not to set this value to something tiny, as it can be hard to recover from that.
I think that I've seen this mentioned before on Linux. But I thought that this was font and font size related.
Can you post some links to pages where this happens?
Thanks jscher2000. I tried the steps you mention and it doesn't seem to make any difference.
Cor-el: I've put a test page on my website which illustrates the problem. It's an absolute vanilla html page and on most browsers the size of the first two boxes are in the range of the 123 to 150 px boxes. Firefox is almost off the scale on my browser at 228.
It's very much a Firefox/linux issue: Firefox/windows gives 142 and on OS-X 149 and Chromium/linux gives 150. I would be very interested if you see something different with Firefox/linux.
Can you attach a screenshot of how this test page looks to you?
Seems to be fine here for me on Linux.
What font size do you see if you check that in the Inspector (click Browser styles in the Computed tab)?
What are your font settings in Preferences > Content?
Correction to jscher2000: I only tried 1 before. However I see that putting >1 changes it progressively. In fact changing it to 1.5 gets the scale on the test page above to 150, which is a popular value with other browsers.
It also makes all the display much larger. Unpleasantly so.
So are my settings not the defaults and the result of some activity in the past? Or is it configured by the distribution?
I can see that I have to play around some more to get a result I'm easy with.
cor-el,
Screenshot attached shows Firefox and Chromium on the same platform. The one I'm concerned about is the first.
You say it "seems fine" but which of those do you see?
My screen is pretty much 96dpi as close as I can measure, so why should I need to increase layout.css.devPixelsPerPx to 1.5?
The browser style in the Inspector shows 14pt. Though what I'm seeing seems less than that. (changed the upload for consistency)
Muudetud
The odd thing about changing layout.css.devPixelsPerPx is that the size of the default input box stays the same and the "px" size of everything else changes - layout and font-sizes. So the relative proportions change but only by changing everything else.
So it comes back to the old question: why is Firefox's default on Linux so different to all the other browsers?
I'm well aware that html/css standards don't define the relation between these units, and that's the basic problem. Trouble is some web designers persist in using size= boxes.
I think size="20" on a text input should precisely fit 20 lower case x characters. Unless the font used for the input is considerably larger than the other text in your screen shot, something is wrong.
I quite agree with you. By your measure I can get about 29 x's in the slot.
Curiously, when I use your layout.css.devPixelsPerPx solution, the text in the box still stays small, so I still get about the same
We've now identified a Firefox/linux bug afaics. Can you file the bug report for me or do I need to do it? You will get it in the right place whereas I might not.
Which Firefox Linux build? The one supplied by Ubuntu or from their program repository, or a build downloaded / updated directly from Mozilla?
Have you tested both?
Build 38.0 marked as 'Mozilla Firefox for Ubuntu canonical - 1.0' It's the standard distribution running under Ubuntu 14.04 LTS 32-bit on Intel® Pentium(R) Dual CPU T3200
I haven't tried alternatives.