From 3cdf17e1bc65553ec6fa166d0da469560eae182f Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 22 Sep 2011 18:47:24 +0100 Subject: [PATCH] Prevent text inputs growing as you type in IE6/7. Applying *overflow:visible to button/input causes text inputs to grow to fit their content, even if an explicit, fixed width is applied. It was originally included to remove excess inner spacing on buttons and submit/reset/button-type inputs in IE6/7. Fixing this bug in IE6 requires dropping the fix entirely because there is no way to avoid it being applied to text inputs. If there is a need to fix this excess spacing bug in IE6, then it should be done using a class that is applied to the necessary elements. For IE7, the excess spacing fix can be moved into the ruleset that targets button and submit/reset/button-type inputs. This prevents text inputs from growing. --- css/style.css | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/css/style.css b/css/style.css index 6853f812df..10371d1a3f 100644 --- a/css/style.css +++ b/css/style.css @@ -156,23 +156,17 @@ button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: ba /* * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet) - * 2. Correct inner spacing displayed oddly in IE6/7 */ -button, input { line-height: normal; *overflow: visible; } - -/* - * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7 - */ - -table button, table input { *overflow: auto; } +button, input { line-height: normal; } /* * 1. Display hand cursor for clickable form elements * 2. Allow styling of clickable form elements in iOS + * 3. Correct inner spacing displayed oddly in IE7 (doesn't effect IE6) */ -button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } +button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; } /* * Consistent box sizing and appearance