Firefox line-height issue with input fields

2019-01-23 01:30发布

I have realized the problem before but I guess it didn't matter as much then as it did now.

What I discovered is that Firefox has a default line-height value of 1.2 for input fields which can not be changed. At least in OSX, don't have Windows so I can't confirm it there.

I did some experimenting and testing and there's just no way to change the default line-height value of Firefox. All the other browsers (ok, I just tried with Chrome and Safari) obey my value perfectly fine but not Firefox.

Has anyone ever noticed this and if yes, have you found a solution to overcome this?

标签: css firefox
7条回答
forever°为你锁心
2楼-- · 2019-01-23 02:14

As far as I know from experience the line-height on input won't change unless you change the font-size - than the line-height will change to be the same as font-size + 4px (2 top 2 bot i guess).

In case this bothers you with styling, you can use the top and bottom padding to achieve a fake bigger line-height effect.

查看更多
登录 后发表回答