Textarea and div padding differences in Firefox

微笑、不失礼 提交于 2019-12-06 08:00:25
Mathijs Flietstra

I can reproduce the described behaviour on Firefox 20.0.1 using this jsFiddle.

I have had a bit of a look around for you, it seems that Firefox has had quite some issues with paddings in combination with textareas in the past, so I'm thinking you might not be able to get rid of it.

I'm not sure if you would class vendor specific prefixes as a browser hack, but I've got one for you.

You can add -moz-padding-start: 2px; and -moz-padding-end: 2px; to your CSS rule, that will fix your wrapping issue: jsFiddle.

you can use reset css for that too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!