Note that there are some explanatory texts on larger screens.

plurals
  1. POInconsistent height of text input elements between Firefox and WebKit
    primarykey
    data
    text
    <p>OK, I realize that this is something of an eternal question, but here goes:</p> <p>I've got a single text input,</p> <pre><code>&lt;input type="text" name="whatever" /&gt; </code></pre> <p>and I've specified its <code>font-family</code>, <code>font-size</code> and <code>padding</code>. Yet, even on the same machine (my Mac, let's say), the input has a different height in Firefox (3.6) than it does in Chrome or Safari. Specifically, Firefox adds a little bit more padding below the text.</p> <p>And no, specifying <code>height</code> in pixels doesn't achieve consistency either.</p> <p>Is there any way to achieve text input height consistency across Gecko- and WebKit-based browsers (let alone IE and Opera) without resorting to JavaScript? And if I must use JavaScript, has someone already devised a jQuery plugin or something to easily do this?</p> <p><strong>Update:</strong> Here's what not to do. The <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" rel="nofollow noreferrer">jqTransform</a> plugin lets you skin form elements and promises that they'll look the same across browsers. Here's how the demo input looks in Chrome 5 on my Mac:</p> <p><img src="https://i.stack.imgur.com/IBHCA.png" alt="jqTransform Chrome input"></p> <p>and here's how the same input looks in Firefox 3.6.4:</p> <p><img src="https://i.stack.imgur.com/G1uwO.png" alt="jqTransform Firefox input"></p> <p>I haven't altered these screenshots in any way, just cropped them. Now, my first reaction is, "Ugh, I don't want to support Firefox." But there are currently more Firefox users than Safari and Chrome users combined, so that's not an option.</p> <p>Someone, please help! I just want my forms to look the same across <em>modern, standards-compliant</em> browsers! And by "look the same," I'm not talking about the <code>outline</code> on selection or anything like that; I'm just talking about having the same width, height, and text placement!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload