Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lining up input elements, off by one in Firefox

Tags:

html

css

forms

I'm hoping I'm missing something simple, but for the life of me I cannot figure out why I can't line up an <input type="text"> next to an <input type="submit">.

A bit of searching on StackOverflow led me to the box-sizing property, which fixed my problem in IE, but Firefox is driving me nuts. The two elements are now the same size, but are offset by 1 pixel.

Here's the offending code on jsfiddle.

Any suggestions?

like image 912
Mark Woon Avatar asked Feb 25 '26 14:02

Mark Woon


1 Answers

You need to set:

input[type=submit]::-moz-focus-inner{ border: 0; }

Changing box model seems result in this effect, but it's essentially the same problem as this.

like image 163
Qtax Avatar answered Feb 28 '26 03:02

Qtax



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!