html - Firefox adds 2px extra padding in input text and submit -
according answers below: best solution: .text { line-height: 15px; } input::-moz-focus-inner {border:0; padding:0; margin-top:-1px; margin-bottom:-1px;} thank all.
i know there similar questions on stackoverflow. because none of answers works me, , have been researching issue week no luck, decide post question. please help.
lets have submit button , text box, firefox adds 2px padding inside elements, tried many solutions found on net none of them works.
test code here: https://jsfiddle.net/4f2duwud/7/
html:
<form action="http://google.com"> <input type="submit" class="submit" value="go google"> <input type="text" class="text"> </form> css:
a.button { -webkit-appearance: button; -moz-appearance: button; appearance: button; text-decoration: none; color: initial; } .text { padding:3px; border: 1px solid gray; } .submit { padding:3px; border:1px solid gray; } input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="text"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner { border:0 !important; padding:0 !important; }
try explicilty setting line-height 15px or 17px or whichever works you


Comments
Post a Comment