Can you tweak the left and right padding on an HTML input button?
-
05-09-2019 - |
Question
The longer an input button's text (value) is, the wider the left and right padding seems to get (IE). Explicit CSS padding seems to have no effect. Does anyone have a hack for this?
Solution
yes try this (PS this bug is fixed in IE8)
padding:1px 4px 1px 4px;/*set to your preferences*/
/*Make IE render reasonably sized buttons*/
overflow:visible;
width:auto;
(note that buttons that are like 30-50 characters long start to degrade again, but they aren't that common)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow