Extra space under textarea, differs along browsers

前端 未结 2 784
既然无缘
既然无缘 2020-12-02 07:37

There`s some extra space under textarea tag. From 1 to 4 pixels in different browsers. The markup is very simple:



        
2条回答
  •  -上瘾入骨i
    2020-12-02 08:13

    Add vertical-align: top to textarea.

    The reason for the gap is that textarea is an inline (or inline-block) element, and the gap is the space reserved for descenders in text. I don't know exactly why the gap is different between different browsers.

提交回复
热议问题